mirror of
https://github.com/astral-sh/ruff.git
synced 2025-07-16 09:35:07 +00:00
![]() ## 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> |
||
---|---|---|
.. | ||
conditionals | ||
assert.md | ||
assignment.md | ||
bool-call.md | ||
boolean.md | ||
complex_target.md | ||
hasattr.md | ||
isinstance.md | ||
issubclass.md | ||
match.md | ||
post_if_statement.md | ||
truthiness.md | ||
type.md | ||
type_guards.md | ||
while.md |