Formatting: Format all python code with black.
This CL is probably not what you're looking for, it's only
automated formatting. Ignore it with
`git blame --ignore-rev <revision>` for this commit.
BUG=b:233893248
TEST=CQ
Change-Id: I66591d7a738d241aed3290138c0f68065ab10a6d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/3879174
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Alex Klein <saklein@chromium.org>
diff --git a/scripts/find_project_path.py b/scripts/find_project_path.py
index 6d90ea6..3604863 100644
--- a/scripts/find_project_path.py
+++ b/scripts/find_project_path.py
@@ -15,28 +15,32 @@
def get_parser():
- """Creates the argparse parser.
+ """Creates the argparse parser.
- Returns:
- commandline.ArgumentParser: The argument parser.
- """
- parser = commandline.ArgumentParser(description=__doc__)
- parser.add_argument('--manifest-file', type='path',
- help='File path to a manifest to search.')
- parser.add_argument('--project', required=True,
- help='The project to search for.')
- parser.add_argument('--branch', default='master',
- help='The branch to search for.')
- return parser
-
+ Returns:
+ commandline.ArgumentParser: The argument parser.
+ """
+ parser = commandline.ArgumentParser(description=__doc__)
+ parser.add_argument(
+ "--manifest-file",
+ type="path",
+ help="File path to a manifest to search.",
+ )
+ parser.add_argument(
+ "--project", required=True, help="The project to search for."
+ )
+ parser.add_argument(
+ "--branch", default="master", help="The branch to search for."
+ )
+ return parser
def main(argv):
- parser = get_parser()
- options = parser.parse_args(argv)
- options.Freeze()
- if options.manifest_file:
- manifest = repo_manifest.Manifest.FromFile(options.manifest_file)
- else:
- manifest = repo_util.Repository.MustFind(__file__).Manifest()
- print(manifest.GetUniqueProject(options.project, options.branch).Path())
+ parser = get_parser()
+ options = parser.parse_args(argv)
+ options.Freeze()
+ if options.manifest_file:
+ manifest = repo_manifest.Manifest.FromFile(options.manifest_file)
+ else:
+ manifest = repo_util.Repository.MustFind(__file__).Manifest()
+ print(manifest.GetUniqueProject(options.project, options.branch).Path())