-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Enable more Ruff PYI rules with autofixes #12557
Conversation
This comment has been minimized.
This comment has been minimized.
pyproject.toml
Outdated
# "PYI029", __str__ and __str__ sometimes have to be used for classes other than `object` | ||
# Sometimes we still wanna be explicit about a default value nonetheless | ||
# "PYI011", Also has false-positives with `_typeshed.sentinel` | ||
# "PYI053", Also removes `Literal[{string_too_long}]` from an annotation |
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.
We noqa that one twice in nanoid stubs for the paramether alphabet: str = "_-0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
Ruff issue for the bad autofix in Literal
: astral-sh/ruff#12995
# avoids duplicate # noqa with flake8-pyi and flake8-noqa flagging `PYI` codes | ||
# See https://github.com/plinss/flake8-noqa/issues/22 |
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.
If anyone has a contact to @plinss , plinss/flake8-noqa#30 would be a nice flake8-noqa feature to get merged ^^"
Doesn't look like Ruff 0.6.2 added anything that should affect this ( |
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
Jelle approved 2 weeks ago and it's unchallenged. I'll merge it. If you see an issue, open a new PR! |
Added rules:
PYI014
,PYI015
,PYI030
,PYI036
,PYI044
,PYI062
I originally split this into 3 sections (
Fix is always available.
,Fix is sometimes available.
, andWe sometimes noqa these
), but I'm not sure if that's something worth doing, keeping it here for archiving purposes: