flake8, bugbear, pyupgrade → ruff#9147
Conversation
433a889 to
67c9641
Compare
Unit Test ResultsSee test report for an extended history of previous test failures. This is useful for diagnosing flaky tests. 27 files ±0 27 suites ±0 9h 53m 24s ⏱️ - 3m 9s For more details on these failures and errors, see this check. Results for commit 279c6cb. ± Comparison against base commit 3c651c6. ♻️ This comment has been updated with latest results. |
252d3c9 to
3176491
Compare
jacobtomlinson
left a comment
There was a problem hiding this comment.
Generally looks good, needs some cleanup though.
distributed/protocol/compression.py
Outdated
| @@ -23,7 +23,7 @@ | |||
|
|
|||
| if TYPE_CHECKING: | |||
| # TODO import from typing (requires Python >=3.10) | |||
There was a problem hiding this comment.
We require 3.10 now so can remove this comment.
distributed/shuffle/_core.py
Outdated
| @@ -49,7 +49,9 @@ | |||
|
|
|||
| if TYPE_CHECKING: | |||
| # TODO import from typing (requires Python >=3.10) | |||
distributed/shuffle/_merge.py
Outdated
| from distributed.shuffle._shuffle import shuffle_transfer | ||
|
|
||
| if TYPE_CHECKING: | ||
| # TODO import from typing (requires Python >=3.10) |
distributed/shuffle/_shuffle.py
Outdated
|
|
||
| logger = logging.getLogger("distributed.shuffle") | ||
| if TYPE_CHECKING: | ||
| # TODO import from typing (requires Python >=3.10) |
distributed/scheduler.py
Outdated
| @@ -148,9 +148,9 @@ | |||
| if TYPE_CHECKING: | |||
| # TODO import from typing (requires Python >=3.10) | |||
| # TODO import from typing (requires Python >=3.11) | |||
There was a problem hiding this comment.
Might be good to move this comment to the line above Self being imported
There was a problem hiding this comment.
I could as well remove the comment, since pyupgarde rules should catch it automatically, after the minimal Python version is bumped to Python 3.11. However, I am not certain it will catch it, because it also didn't catch that ParamSpec is part of typing starting with Python 3.10.
8496163 to
a92740b
Compare
B007 Loop control variable not used within loop body
warning: Invalid rule code provided to `# noqa`
RUF100 Unused `noqa` directive
UP007 Use `X | Y` for type annotations
UP032 Use f-string instead of `format` call Contains manual changes on top of automatic changes.
UP035 Import from `collections.abc` instead UP035 Import from `typing` instead
UP041 Replace aliased errors with `TimeoutError`
This rule will be applied in a PR of its own.
Co-authored-by: Jacob Tomlinson <jacobtomlinson@users.noreply.github.com>
Co-authored-by: Jacob Tomlinson <jacobtomlinson@users.noreply.github.com>
bfac58a to
279c6cb
Compare
|
Rebased. |
No description provided.