-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[ty] Reimplement equivalence via mutual subtyping #20267
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
Conversation
Diagnostic diff on typing conformance testsNo changes detected when running ty on typing conformance tests ✅ |
|
|
|
We should narrow |
|
How do the property tests feel about this change? |
|
See #18799 for where I previously experimented with this; the PR description there explains why this breaks transitivity of subtyping. |
That seems incorrect in principle. That type is equivalent to
|
8fb1ab2 to
a19284d
Compare
Any a subtype of Anya19284d to
1a73410
Compare
|
I think you're right that making Anyway, it's not possible to implement |
CodSpeed WallTime Performance ReportMerging #20267 will degrade performances by 10.69%Comparing Summary
Benchmarks breakdown
|
CodSpeed Instrumentation Performance ReportMerging #20267 will degrade performances by 14.29%Comparing Summary
Benchmarks breakdown
|
|
Anyway, I don't plan to spend much more time on this right now; it was just an experiment prompted by astral-sh/ty#1132 (for which one solution would be to do less eager union simplification -- but doing less eager union simplification breaks our current implementation of equivalence).
the actual code in beartype used a custom function with a |
Summary
Test Plan