Format code using yapf

This commit is contained in:
Eloston
2018-07-29 07:24:29 +00:00
parent 2bcee6553d
commit 4d527713d1
17 changed files with 335 additions and 229 deletions

View File

@@ -4,7 +4,6 @@
# Copyright (c) 2018 The ungoogled-chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Generates updating_patch_order.list in the buildspace for updating patches"""
import argparse
@@ -16,18 +15,25 @@ from buildkit.common import ENCODING
from buildkit.cli import NewBaseBundleAction
sys.path.pop(0)
def main(arg_list=None):
"""CLI entrypoint"""
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument('base_bundle', action=NewBaseBundleAction,
help='The base bundle to generate a patch order from')
parser.add_argument('--output', metavar='PATH', type=Path,
default='buildspace/updating_patch_order.list',
help='The patch order file to write')
parser.add_argument(
'base_bundle',
action=NewBaseBundleAction,
help='The base bundle to generate a patch order from')
parser.add_argument(
'--output',
metavar='PATH',
type=Path,
default='buildspace/updating_patch_order.list',
help='The patch order file to write')
args = parser.parse_args(args=arg_list)
with args.output.open('w', encoding=ENCODING) as file_obj:
file_obj.writelines('%s\n' % x for x in args.base_bundle.patches)
if __name__ == "__main__":
main()