Skip to content
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

[Style] update flake8 to latest and update requirements #48023

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

CheyuWu
Copy link

@CheyuWu CheyuWu commented Oct 15, 2024

Why are these changes needed?

  • flake8 version is too old to be compatible with Python 3.12

Related issue number

Closes #48022

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
    • I've added any new APIs to the API Reference. For example, if I added a
      method in Tune, I've added it in doc/source/tune/api/ under the
      corresponding .rst file.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

cc @MortalHappiness

…an unexpected keyword argument 'unsafe_hash'.

Signed-off-by: Cheyu Wu <[email protected]>
flake8-comprehensions==3.10.1,
flake8-quotes==2.0.0,
flake8-comprehensions==3.15.0,
flake8-quotes==3.4.0,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you need to upgrade bugbear too, and update the python/requirements_copmiled.txt file

here is an example of the dependency update of flake (without the additional ignore list though).

https://github.com/ray-project/ray/pull/45844/files

Copy link
Author

@CheyuWu CheyuWu Oct 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, no problem. Thanks for your advice

@MortalHappiness MortalHappiness self-assigned this Oct 15, 2024
@@ -521,17 +521,21 @@ filelock==3.13.1
# torch
# transformers
# virtualenv
flake8==3.9.1
flake8==7.1.1; python_version > '3.8'
flake8==3.9.1; python_version <= '3.8'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we do not support <=3.8 anymore. can you just remove those?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I will handle that

Copy link
Author

@CheyuWu CheyuWu Oct 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, The pipeline will be checked for Python 3.8.
I'm not sure how to resolve this issue since the CI pipeline will pull Python 3.8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade flake8 in CI and pre-commit hook. Ignore all rules that will cause code change.
3 participants