Skip to content

Conversation

@tungol
Copy link
Contributor

@tungol tungol commented Dec 20, 2024

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 from builtins.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.

@github-actions

This comment has been minimized.

@tungol tungol marked this pull request as draft December 20, 2024 21:09
@tungol
Copy link
Contributor Author

tungol commented Dec 20, 2024

Just one allowlist entry for the stdlib I guess; working on allowlisting the missing third-party __all__...

@github-actions

This comment has been minimized.

@JelleZijlstra
Copy link
Member

I don't know if you normally wait a little before moving to the new version of mypy in typeshed

No, the sooner the better! Thanks for working on this.

APPEND_ONLY = 2

class CoerciveEnum(Enum):
class CoerciveEnum(Enum): # type: ignore[misc] # Enum with no members
Copy link
Member

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.

Copy link
Contributor Author

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.


JWKTypesRegistry: Incomplete

class ParmType(Enum):
Copy link
Member

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.

@github-actions
Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@tungol tungol marked this pull request as ready for review December 21, 2024 00:51
@JelleZijlstra JelleZijlstra merged commit 097581e into python:main Dec 21, 2024
103 checks passed
@tungol tungol deleted the bumpmypy branch December 21, 2024 06:18
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