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

[Epic][CI] Migrate linter to Ruff #47991

Open
19 of 38 tasks
MortalHappiness opened this issue Oct 11, 2024 · 4 comments
Open
19 of 38 tasks

[Epic][CI] Migrate linter to Ruff #47991

MortalHappiness opened this issue Oct 11, 2024 · 4 comments
Assignees
Labels
ci-test enhancement Request for new feature and/or capability

Comments

@MortalHappiness
Copy link
Member

MortalHappiness commented Oct 11, 2024

What happened + What you expected to happen

While running the pre-commit hook of flake8, error occurs if Python version is 3.12. It's because the version of flake8 is too old.

We decided to fix this issue by migrating to ruff linter.

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:

  • flake8==7.1.1
  • flake8-comprehensions==3.15.0
  • flake8-quotes==3.4.0
  • flake8-bugbear==24.8.19

Issue Severity

Low: It annoys or frustrates me.

Subtasks tracking

@MortalHappiness MortalHappiness added bug Something that is supposed to be working; but isn't ci-test labels Oct 11, 2024
@CheyuWu
Copy link

CheyuWu commented Oct 11, 2024

@MortalHappiness I'd like to help with this!

@MortalHappiness MortalHappiness self-assigned this Oct 15, 2024
@MortalHappiness MortalHappiness changed the title [CI] flake8 version is too old to be compatible with Python 3.12 [Epic][CI] Upgrade flake8 to version 7.1.1 Oct 15, 2024
@MortalHappiness MortalHappiness added the enhancement Request for new feature and/or capability label Oct 15, 2024
edoakes pushed a commit that referenced this issue Jan 18, 2025
## Why are these changes needed?

Replace mutable default value with None to prevent shared state across
ContextVar.get() calls

ref : https://docs.astral.sh/ruff/rules/mutable-contextvar-default/

## Related issue number

#47991 

---------

Signed-off-by: LeoLiao123 <[email protected]>
kenchung285 added a commit to kenchung285/ray that referenced this issue Jan 24, 2025
anson627 pushed a commit to anson627/ray that referenced this issue Jan 31, 2025
…t#49854)

## Why are these changes needed?

Replace mutable default value with None to prevent shared state across
ContextVar.get() calls

ref : https://docs.astral.sh/ruff/rules/mutable-contextvar-default/

## Related issue number

ray-project#47991

---------

Signed-off-by: LeoLiao123 <[email protected]>
Signed-off-by: Anson Qian <[email protected]>
srinathk10 pushed a commit that referenced this issue Feb 2, 2025
## Why are these changes needed?

Replace mutable default value with None to prevent shared state across
ContextVar.get() calls

ref : https://docs.astral.sh/ruff/rules/mutable-contextvar-default/

## Related issue number

#47991 

---------

Signed-off-by: LeoLiao123 <[email protected]>
@MortalHappiness MortalHappiness added core Issues that should be addressed in Ray Core jira-core and removed bug Something that is supposed to be working; but isn't core Issues that should be addressed in Ray Core jira-core labels Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-test enhancement Request for new feature and/or capability
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants