Skip to content
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

Add ExactType to experimental #31

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sobolevn
Copy link

Comment on lines +52 to +55
@property
def __class__(self, /) -> type[_T]: ...
@__class__.setter
def __class__(self, t: type[_T], /) -> None: ...
Copy link

Choose a reason for hiding this comment

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

This can be simplified:

Suggested change
@property
def __class__(self, /) -> type[_T]: ...
@__class__.setter
def __class__(self, t: type[_T], /) -> None: ...
__class__: type[_T]

@JelleZijlstra
Copy link
Collaborator

It's easy to show this is unsound: https://mypy-play.net/?mypy=latest&python=3.12&gist=e3f654f7d6840c8648f9a978671a2961 . Not sure we should add it here.

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.

3 participants