Update Ruff, run on more files, replace pycln and simplify configs#2676
Open
Avasam wants to merge 24 commits intomhammond:mainfrom
Open
Update Ruff, run on more files, replace pycln and simplify configs#2676Avasam wants to merge 24 commits intomhammond:mainfrom
Avasam wants to merge 24 commits intomhammond:mainfrom
Conversation
4346978 to
e231f97
Compare
Avasam
commented
Nov 9, 2025
Comment on lines
+9
to
+11
| from . import ( | ||
| # https://github.com/astral-sh/ruff/issues/15705 | ||
| IDLEenvironment, # noqa: F401 # Injects fast_readline into the IDLE auto-indent extension |
Collaborator
Author
There was a problem hiding this comment.
astral-sh/ruff#15705
This was also already affecting pycln
Avasam
commented
Nov 9, 2025
| # No such concerns for stdlib | ||
| "TC003", # typing-only-standard-library-import | ||
| # Lots of lazy or side-effect imports | ||
| "PLC0415", # import-outside-top-level |
Collaborator
Author
There was a problem hiding this comment.
Added ignore for Ruff 0.12
Avasam
commented
Nov 9, 2025
ruff.toml
Outdated
Comment on lines
54
to
58
| [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"] |
Collaborator
Author
There was a problem hiding this comment.
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. (also solved by #233)
…e-Ruff-and-simplify-configs
…/Avasam/pywin32 into Update-Ruff-and-simplify-configs
…/Avasam/pywin32 into Update-Ruff-and-simplify-configs
Avasam
commented
Dec 10, 2025
…e-Ruff-and-simplify-configs
…e-Ruff-and-simplify-configs
…/Avasam/pywin32 into Update-Ruff-and-simplify-configs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
*.pywand*.pysfiles