diff options
author | Mike Frysinger <vapier@google.com> | 2023-06-09 15:33:24 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@google.com> | 2023-06-09 23:12:06 +0000 |
commit | fb36fbd0108129e84c129a404840e34730459877 (patch) | |
tree | 030a2e3a92198120d99709d63adbba779d6630f6 | |
parent | d074a2949f95daaa5c70da8b38ad3177d56087c5 (diff) | |
download | repohooks-fb36fbd0108129e84c129a404840e34730459877.tar.gz |
pre-upload: fix up a few more lint errors that snuck in
Bug: 196850310
Test: `./tools/pylint.py pre-upload.py` is clean
Change-Id: I050edb3e05a35530b8234d23413fbae57f9969ad
-rwxr-xr-x | pre-upload.py | 5 | ||||
-rw-r--r-- | tools/pylintrc | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/pre-upload.py b/pre-upload.py index 087dd31..3a9d599 100755 --- a/pre-upload.py +++ b/pre-upload.py @@ -438,10 +438,11 @@ def _identify_project(path, from_git=False): cmd = ['git', 'rev-parse', '--show-toplevel'] project_path = rh.utils.run(cmd, capture_output=True).stdout.strip() cmd = ['git', 'rev-parse', '--show-superproject-working-tree'] - superproject_path = rh.utils.run(cmd, capture_output=True).stdout.strip() + superproject_path = rh.utils.run( + cmd, capture_output=True).stdout.strip() module_path = project_path[len(superproject_path) + 1:] cmd = ['git', 'config', '-f', '.gitmodules', - '--name-only', '--get-regexp', '^submodule\..*\.path$', + '--name-only', '--get-regexp', r'^submodule\..*\.path$', f"^{module_path}$"] module_name = rh.utils.run(cmd, cwd=superproject_path, capture_output=True).stdout.strip() diff --git a/tools/pylintrc b/tools/pylintrc index cf157e0..3abe640 100644 --- a/tools/pylintrc +++ b/tools/pylintrc @@ -92,6 +92,10 @@ disable= invalid-name, locally-disabled, missing-docstring, + no-else-break, + no-else-continue, + no-else-raise, + no-else-return, too-few-public-methods, too-many-arguments, too-many-branches, |