ruff/crates/ty_python_semantic
Suneet Tipirneni ef8281b695
[ty] add support for mapped union and intersection subscript loads (#18846)
## Summary

Note this modifies the diagnostics a bit. Previously performing
subscript access on something like `NotSubscriptable1 |
NotSubscriptable2` would report the full type as not being
subscriptable:

```
[non-subscriptable] "Cannot subscript object of type `NotSubscriptable1 | NotSubscriptable2` with no `__getitem__` method"
```

Now each erroneous constituent has a separate error:

```
[non-subscriptable] "Cannot subscript object of type `NotSubscriptable2` with no `__getitem__` method"
[non-subscriptable] "Cannot subscript object of type `NotSubscriptable1` with no `__getitem__` method"
```

Closes https://github.com/astral-sh/ty/issues/625

## Test Plan

 mdtest

---------

Co-authored-by: Carl Meyer <carl@astral.sh>
2025-06-23 16:38:01 +00:00
..
resources [ty] add support for mapped union and intersection subscript loads (#18846) 2025-06-23 16:38:01 +00:00
src [ty] add support for mapped union and intersection subscript loads (#18846) 2025-06-23 16:38:01 +00:00
tests [ty] Use more parallelism when running corpus tests (#18711) 2025-06-16 17:38:55 +00:00
build.rs
Cargo.toml [ty] Pull types on synthesized Python files created by mdtest (#18539) 2025-06-12 10:32:17 +01:00
mdtest.py
mdtest.py.lock