mirror of
https://github.com/morgan9e/helium
synced 2026-04-15 00:44:06 +09:00
Format code using yapf
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user