-
-
Notifications
You must be signed in to change notification settings - Fork 746
flake8, bugbear, pyupgrade → ruff #9147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally looks good, needs some cleanup though.
distributed/protocol/compression.py
Outdated
| from distributed.utils import ensure_memoryview, nbytes | ||
|
|
||
| if TYPE_CHECKING: | ||
| # TODO import from typing (requires Python >=3.10) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We require 3.10 now so can remove this comment.
distributed/shuffle/_core.py
Outdated
| from distributed.utils_comm import retry | ||
|
|
||
| if TYPE_CHECKING: | ||
| # TODO import from typing (requires Python >=3.10) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can remove this comment
distributed/shuffle/_merge.py
Outdated
| from distributed.shuffle._shuffle import shuffle_transfer | ||
|
|
||
| if TYPE_CHECKING: | ||
| # TODO import from typing (requires Python >=3.10) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can remove this comment
distributed/shuffle/_shuffle.py
Outdated
|
|
||
| logger = logging.getLogger("distributed.shuffle") | ||
| if TYPE_CHECKING: | ||
| # TODO import from typing (requires Python >=3.10) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can remove this comment
distributed/scheduler.py
Outdated
|
|
||
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be good to move this comment to the line above Self being imported
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <[email protected]>
Co-authored-by: Jacob Tomlinson <[email protected]>
bfac58a to
279c6cb
Compare
|
Rebased. |
No description provided.