Skip to content

Disable more ruff rules #1610

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

Merged
merged 1 commit into from
May 24, 2024
Merged

Conversation

DimitriPapadopoulos
Copy link
Contributor

They are not compatible with ruff format or are actual anti-patterns.

They are not compatible with `ruff format` or are actual anti-patterns.
@martindurant
Copy link
Member

@Skylion007 , thoughts ?

@DimitriPapadopoulos DimitriPapadopoulos marked this pull request as draft May 23, 2024 16:12
@DimitriPapadopoulos DimitriPapadopoulos marked this pull request as ready for review May 23, 2024 16:13
@@ -189,6 +189,23 @@ ignore = [
# Fix these codes later
"G004",
"PERF203",
# https://github.com/astral-sh/ruff/issues/7871
"UP038",
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be disabled, but it should also be tabled by setting the target python version low enough.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Could you provide more precise guidance? Right now, the minimal supported version is defined in pyproject.toml:

requires-python = ">=3.8"

What would you like to change? Also, why should the minimal supported version of Python depend on a ruff rule?

Copy link
Member

Choose a reason for hiding this comment

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

@Skylion007 , are you OK with having "UP038" in this list for now?

Copy link
Contributor

Choose a reason for hiding this comment

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

Leave it disabled, it doesn't affect us anyway.

If it's really triggering despite the Python version, this might be a ruff a bug that we should file upstream though. It's suppose to have version checks to prevent it suggesting upgrades which break the min version.

Copy link
Contributor

@Skylion007 Skylion007 left a comment

Choose a reason for hiding this comment

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

These look fine.

@martindurant martindurant merged commit db6372a into fsspec:master May 24, 2024
11 checks passed
@DimitriPapadopoulos DimitriPapadopoulos deleted the ruff branch May 24, 2024 16:44
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.

3 participants