Skip to content

Support protocol inference for Type[T] via metaclass#14554

Merged
hauntsaninja merged 1 commit intopython:masterfrom
ilevkivskyi:meta-infer
Jan 29, 2023
Merged

Support protocol inference for Type[T] via metaclass#14554
hauntsaninja merged 1 commit intopython:masterfrom
ilevkivskyi:meta-infer

Conversation

@ilevkivskyi
Copy link
Copy Markdown
Member

Fixes #12553

This looks quite niche, but also it was mentioned recently couple times for a real-life use case: enum classes, and implementation looks simple.

Copy link
Copy Markdown
Collaborator

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

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

Nice!

@github-actions
Copy link
Copy Markdown
Contributor

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

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.

iter doesn't work on TypeVar with bound of Enum

2 participants