mirror of
https://gerrit.googlesource.com/git-repo
synced 2026-11-14 16:27:13 +00:00
flake8: fix warnings with newer versions
The flake8 version hasn't updated properly due the uv.lock file being out of date. Fix newer warnings before unwedging that. We have a lot of B042 errors that probably should be fixed by reworking the code, but for now suppress them since we've been doing this for a long time in repo. error.py:25:5: B042 Exception class with `__init__` should pass all args to `super().__init__()` to work in edge cases of `pickle` and `copy.copy()`. It should also not take any kwargs. The only other warning is fairly simple: subcmds/sync.py:1154:9: B018 Found useless Call expression. Consider either assigning it to a variable or removing it. Change-Id: I532000a66a5d8493a490fa30080b137aff5f706e Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/655844 Tested-by: Mike Frysinger <vapier@google.com> Commit-Queue: Mike Frysinger <vapier@google.com> Reviewed-by: Gavin Mak <gavinmak@google.com>
This commit is contained in:
1 parent
11bf826a10
commit
96363629bd
2 files changed
+4
-1
No files matched your search
@@ -26,6 +26,9 @@ per-file-ignores =
|
||||
tests/e2e/test_workflows.py: IMR241,
|
||||
tests/test_subcmds_sync.py: IMR241,
|
||||
extend-ignore =
|
||||
# B042: Exception class with __init__ should pass all args to super().__init__()
|
||||
# We should fix this by reworking our exception classes.
|
||||
B042,
|
||||
# E203: Whitespace before ':'
|
||||
# See https://github.com/PyCQA/pycodestyle/issues/373
|
||||
E203,
|
||||
|
||||
+1
-1
@@ -1199,7 +1199,7 @@ later is required to fix a server side protocol bug.
|
||||
# job at the same time. Then the connection may fail if too many
|
||||
# connections are pending and execeeded the socket listening backlog,
|
||||
# especially on MacOS.
|
||||
len(cls.get_parallel_context()["sync_dict"])
|
||||
_ = len(cls.get_parallel_context()["sync_dict"])
|
||||
|
||||
def _Fetch(self, projects, opt, err_event, ssh_proxy, errors):
|
||||
ret = True
|
||||
|
||||
Reference in new issue
Block a user