Open MortalHappiness opened 1 month ago
@MortalHappiness I'd like to help with this!
@MortalHappiness we should explore replacing flake8 with https://github.com/astral-sh/ruff if we want to do the upgrade.
@jjyao Do you mean to replace flake8 completely with ruff?
Yes. Reasoning is that ruff
is drop-in replacement for flake8
so upgrading flake8 and switching to ruff should require the similar amount of efforts.
What happened + What you expected to happen
While running the pre-commit hook of flake8, the following error occurs if Python version is 3.12. It's because the version of flake8 is too old.
Versions / Dependencies
Python 3.12
Reproduction script
If python version is 3.9 -> no error
If python version is 3.12 -> has error
Upgrade the following packages to the newest version solves this issue:
Issue Severity
Low: It annoys or frustrates me.
flake8
upgrade subtasks tracking:Thanks for @CheyuWu 's comment here https://github.com/ray-project/ray/issues/48022#issuecomment-2414051046
pycodestyle
pyflakes
flake8-bugbear
https://github.com/PyCQA/flake8-bugbear
flake8-comprehensions
https://github.com/adamchainz/flake8-comprehensions
CI upgrade
Cleanup
Notes for contributors
Replace
E721
with the rule that you want to fix.git add
andcommit
.git commit -n
to bypass the pre-commit hook and commit.git commit --amend --no-edit --signoff
to sign off the commit from the previous step.