Skip to content

Conversation

@Avasam
Copy link
Collaborator

@Avasam Avasam commented Nov 9, 2025

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.

@Avasam Avasam force-pushed the Update-Ruff-and-simplify-configs branch from 4346978 to e231f97 Compare November 9, 2025 19:30
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
Copy link
Collaborator Author

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

@Avasam Avasam changed the title Update Ruff and simplify configs Replace pycln w/ Ruff, update Ruff and simplify configs Nov 9, 2025
@Avasam Avasam changed the title Replace pycln w/ Ruff, update Ruff and simplify configs Update Ruff, replace pycln and simplify configs 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
Copy link
Collaborator Author

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

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"]
Copy link
Collaborator Author

@Avasam Avasam Nov 9, 2025

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.

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.

1 participant