-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[ty] Add subtyping between SubclassOf and CallableType #19026
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
[ty] Add subtyping between SubclassOf and CallableType #19026
Conversation
|
I think the mypy primer is correct. Since Maybe a bit of an unfortunate diagnostic but it seems sound. Their mistake is not marking the class with |
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.
This looks good to me, and I ran the property tests at a million iterations with no failures.
Oh, and I agree with your primer evaluation 100%! |
The reason this accurate diagnostic was previously hidden is because |
Summary
Part of astral-sh/ty#129
There were previously some false positives here.
Test Plan
Updated
is_subtype_of.md
andis_assignable_to.md