[ty] error for attribute access on union where some elements lack the attribute#23042
[ty] error for attribute access on union where some elements lack the attribute#23042oconnor663 merged 1 commit intomainfrom
Conversation
Typing conformance results improved 🎉The percentage of diagnostics emitted that were expected errors increased from 83.49% to 83.51%. The percentage of expected errors that received a diagnostic increased from 74.24% to 74.33%. Summary
True positives addedDetails
|
|
| Lint rule | Added | Removed | Changed |
|---|---|---|---|
unresolved-attribute |
9,715 | 0 | 0 |
possibly-missing-attribute |
0 | 9,653 | 0 |
unsupported-operator |
84 | 1 | 50 |
not-subscriptable |
96 | 1 | 0 |
unused-type-ignore-comment |
0 | 25 | 0 |
invalid-argument-type |
4 | 7 | 9 |
no-matching-overload |
0 | 20 | 0 |
invalid-parameter-default |
0 | 0 | 7 |
invalid-return-type |
0 | 1 | 3 |
invalid-assignment |
0 | 0 | 2 |
not-iterable |
0 | 0 | 2 |
| Total | 9,899 | 9,708 | 73 |
|
|
Hmm -- my assumption of how we'd fix this issue had been that we would map over the union earlier in attribute access, therefore avoiding the |
carljm
left a comment
There was a problem hiding this comment.
This clearly has a positive conformance and ecosystem impact, so I think we should go ahead with it for now. I still wonder if we may run into cases in the future that motivate us to map over unions earlier in attribute access, but landing this doesn't prevent us from doing that in future, when it's well-motivated.
|
Currently this PR has the |
07fe7bf to
c32c923
Compare
c32c923 to
5b344d6
Compare
|
I can't figure out another way to do this that doesn't involve more duplication than what's here, so I'm going to land this as-is. |
Memory usage reportMemory usage unchanged ✅ |
Fixes astral-sh/ty#1656