ruff/crates/ty_python_semantic/src/semantic_index
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
..
builder Rename Red Knot (#17820) 2025-05-03 19:49:15 +02:00
use_def [ty] Reachability constraints (#18621) 2025-06-17 09:24:28 +02:00
ast_ids.rs [ty] type narrowing by attribute/subscript assignments (#18041) 2025-06-04 17:24:27 -07:00
builder.rs [ty] basic narrowing on attribute and subscript expressions (#17643) 2025-06-17 11:07:46 +02:00
definition.rs [ty] Delay computation of 'unbound' visibility for implicit instance attributes (#18669) 2025-06-13 12:50:57 -07:00
expression.rs [ty] Add infrastructure for AST garbage collection (#18445) 2025-06-05 11:43:18 -04:00
narrowing_constraints.rs [ty] basic narrowing on attribute and subscript expressions (#17643) 2025-06-17 11:07:46 +02:00
place.rs [ty] basic narrowing on attribute and subscript expressions (#17643) 2025-06-17 11:07:46 +02:00
predicate.rs [ty] Reachability constraints (#18621) 2025-06-17 09:24:28 +02:00
re_exports.rs [ty] AST garbage collection (#18482) 2025-06-13 08:40:11 -04:00
reachability_constraints.rs [ty] Reachability constraints (#18621) 2025-06-17 09:24:28 +02:00
use_def.rs [ty] basic narrowing on attribute and subscript expressions (#17643) 2025-06-17 11:07:46 +02:00