-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Update to mypy 1.14 #13272
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
Update to mypy 1.14 #13272
Conversation
This comment has been minimized.
This comment has been minimized.
Just one allowlist entry for the stdlib I guess; working on allowlisting the missing third-party |
This comment has been minimized.
This comment has been minimized.
No, the sooner the better! Thanks for working on this. |
@@ -8,15 +8,15 @@ class SignatureFlag(IntEnum): | |||
SIGNATURES_EXIST = 1 | |||
APPEND_ONLY = 2 | |||
|
|||
class CoerciveEnum(Enum): | |||
class CoerciveEnum(Enum): # type: ignore[misc] # Enum with no members |
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.
That might be a false positive? An enum with no members is OK, it makes an abstract class.
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.
Yeah; mypy is flagging them with an error like this:
error: Detected enum "fpdf.enums.CoerciveEnum" in a type stub with zero members. There is a chance this is due to a recent change in the semantics of enum membership. If so, use `member = value` to mark an enum member, instead of `member: type` [misc]
I didn't check whether there's a better way to silence that.
@@ -29,10 +29,10 @@ priv_bytes: Incomplete | |||
JWKTypesRegistry: Incomplete | |||
|
|||
class ParmType(Enum): |
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.
Unrelated but I'm pretty sure this is a typo for "Param" in the runtime package.
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
I don't know if you normally wait a little before moving to the new version of mypy in typeshed. Personally, I've been waiting for it to come out because disentangling
types.DynamicClassAttribute
frombuiltins.property
is one of the last things on my inheritance check todo list, and python/mypy#18150 in the new version enables that.Just one new allowlist entry needed, which will be resolved by #13038 if/when it's accepted.