ruff/crates/ty_python_semantic/resources
Shunsuke Shibayama ef564094a9
[ty] support del statement and deletion of except handler names (#18593)
## Summary

This PR closes https://github.com/astral-sh/ty/issues/238.

Since `DefinitionState::Deleted` was introduced in #18041, support for
the `del` statement (and deletion of except handler names) is
straightforward.

However, it is difficult to determine whether references to attributes
or subscripts are unresolved after they are deleted. This PR only
invalidates narrowing by assignment if the attribute or subscript is
deleted.

## Test Plan

`mdtest/del.md` is added.

---------

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2025-06-12 07:44:42 -07:00
..
corpus Move corpus tests to ty_python_semantic (#18609) 2025-06-11 08:55:30 +02:00
mdtest [ty] support del statement and deletion of except handler names (#18593) 2025-06-12 07:44:42 -07:00
primer [ty] Promote projects to good that now no longer hang (#18370) 2025-06-01 17:25: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.