scripts: Lint fixes.
line-too-long and docstring-section-indent fixes. Misc spelling
and grammar fixes.
BUG=None
TEST=CQ
Change-Id: I430f8c770fa60be0136220b7658b2542d68908f2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/4416214
Tested-by: Alex Klein <saklein@chromium.org>
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
Auto-Submit: Alex Klein <saklein@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
diff --git a/scripts/build_api.py b/scripts/build_api.py
index 53bfc44..5e540e9 100644
--- a/scripts/build_api.py
+++ b/scripts/build_api.py
@@ -91,8 +91,9 @@
)
if opts.service_method not in methods:
- # Unknown method, try to match against known methods and make a suggestion.
- # This is just for developer assistance, e.g. misspellings when testing.
+ # Unknown method, try to match against known methods and make a
+ # suggestion. This is just for developer assistance, e.g. misspellings
+ # when testing.
matched = matching.GetMostLikelyMatchedObject(
methods, opts.service_method, matched_score_threshold=0.6
)
@@ -165,7 +166,8 @@
router = router_lib.GetRouter()
opts = _ParseArgs(argv, router)
- # For build_image, make sure we run with network disabled to prevent leakage.
+ # For build_image, make sure we run with network disabled to prevent
+ # leakage.
if (
cros_build_lib.IsInsideChroot()
and opts.service_method == "chromite.api.ImageService/Create"
@@ -184,9 +186,9 @@
logging.warning("Ignoring $BUILD_API_TEE_LOG_FILE env var")
if opts.config.mock_invalid:
- # --mock-invalid handling. We print error messages, but no output is ever
- # set for validation errors, so we can handle it by just giving back the
- # correct return code here.
+ # --mock-invalid handling. We print error messages, but no output is
+ # ever set for validation errors, so we can handle it by just giving
+ # back the correct return code here.
return controller.RETURN_CODE_INVALID_INPUT
input_handler, output_handlers = _get_io_handlers(opts)
@@ -201,6 +203,6 @@
opts.config_handler,
)
except router_lib.Error as e:
- # Handle router_lib.Error derivatives nicely, but let anything else bubble
- # up.
+ # Handle router_lib.Error derivatives nicely, but let anything else
+ # bubble up.
cros_build_lib.Die(e)