-
Notifications
You must be signed in to change notification settings - Fork 845
Update Ruff, replace pycln and simplify configs #2676
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
base: main
Are you sure you want to change the base?
Conversation
4346978 to
e231f97
Compare
| from . import ( | ||
| # https://github.com/astral-sh/ruff/issues/15705 | ||
| IDLEenvironment, # noqa: F401 # Injects fast_readline into the IDLE auto-indent extension |
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.
astral-sh/ruff#15705
This was also already affecting pycln
| # No such concerns for stdlib | ||
| "TC003", # typing-only-standard-library-import | ||
| # Lots of lazy or side-effect imports | ||
| "PLC0415", # import-outside-top-level |
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.
Added ignore for Ruff 0.12
| [lint.per-file-ignores] | ||
| # Explicit re-exports is fine in __init__.py, still a code smell elsewhere. | ||
| "__init__.py" = ["PLC0414"] | ||
| # TODO: Make adodbapi changes in their own PRs | ||
| "adodbapi/*" = ["C4", "YTT301", "UP031", "UP032"] |
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.
PLC0414 is now ignored in __init__.py by default
UP031 and UP032 are already ignored globally, so are redundant here.
YTT301 was already passing
C4 had 3 fairly minor and safe autofixes.
pycln was very useful as a starting point before all modules with intended side-effect were properly identified. Using Ruff instead reduces tooling dependencies, configs, special pragma comment keywords and time spent on CI.