-
Notifications
You must be signed in to change notification settings - Fork 37
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
PYI024 is noisy #165
Comments
I've only spot-checked a few repos, and already I've encountered three instances of this check failing. I'm not sure the check should be disabled, but it sure is inconvenient to have it right now. |
This check in particular aims for typed code (function-based namedtuples can't have their attributes typed). Given there's a lot of skeleton-based projects that can only afford very basic type-checking, or doesn't even pass basic mypy yet. It would make sense to leave changing That would be my reasoning for disabling That being said, I wonder if it could suggest an autofix where the attributes are typed as |
idk if mypy reports it, but pyright does with reportUntypedNamedTuple. So there's already some overlap with type checkers there. |
This rule turns out to be noisy (PYI024 in particular). It requires re-writing all namedtuples to typing.NamedTuples and can't be fixed mechanically.
Originally posted by @jaraco in #160 (comment)
The text was updated successfully, but these errors were encountered: