ruff/crates/ty_python_semantic/resources
Shunsuke Shibayama 342b2665db
[ty] basic narrowing on attribute and subscript expressions (#17643)
## Summary

This PR closes astral-sh/ty#164.

This PR introduces a basic type narrowing mechanism for
attribute/subscript expressions.
Member accesses, int literal subscripts, string literal subscripts are
supported (same as mypy and pyright).

## Test Plan

New test cases are added to `mdtest/narrow/complex_target.md`.

---------

Co-authored-by: David Peter <mail@david-peter.de>
2025-06-17 11:07:46 +02:00
..
corpus Move corpus tests to ty_python_semantic (#18609) 2025-06-11 08:55:30 +02:00
mdtest [ty] basic narrowing on attribute and subscript expressions (#17643) 2025-06-17 11:07:46 +02:00
primer [ty] basic narrowing on attribute and subscript expressions (#17643) 2025-06-17 11:07:46 +02:00
README.md Rename Red Knot (#17820) 2025-05-03 19:49:15 +02:00

Markdown files within the mdtest/ subdirectory are tests of type inference and type checking; executed by the tests/mdtest.rs integration test.

See crates/ty_test/README.md for documentation of this test format.