Skip to content

Conversation

@Daraan
Copy link
Contributor

@Daraan Daraan commented Jul 8, 2025

In relation to the pre-commit PR #628. A while ago I started a list of ruff rules that need to be ignored in the future. With the latest version of ruff (0.12) - if we add it - some of the preview rules became active in the standard set (e.g., UP045, RUF041) but shouldn't be applied to typing_extensions.
Some of the rules I've added in this PR are still in preview, I think it makes sense to add them pro-actively.

Possibly we want RUF023 (sorted slots) only on a per line ignore.

    "RUF012",  # Use ClassVar for mutables (active now)
    "RUF022",  # Unsorted __all__  (active now)
    "RUF023",  # Unsorted __slots__ (active now)
    "RUF031",  # parentheses for tuples in subscripts (preview)
    "RUF041",  # nested Literal (active now)
    "RUF036",  # None not at end of Union (preview)
    "B903",  # Use dataclass / namedtuple  (preview)

Copy link
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

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

Thank you!!

Copy link
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

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

great, thank you!

@AlexWaygood AlexWaygood merged commit b136f51 into python:main Jul 8, 2025
22 checks passed
@Daraan Daraan deleted the upgrade-ruff branch July 8, 2025 12:58
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.

2 participants