ruff
e9a64e58 - [ty] make `del x` force local resolution of `x` in the current scope (#19389)

Commit
212 days ago
[ty] make `del x` force local resolution of `x` in the current scope (#19389) Fixes https://github.com/astral-sh/ty/issues/769. **Updated:** The preferred approach here is to keep the SemanticIndex simple (`del` of any name marks that name "bound" in the current scope) and to move complexity to type inference (free variable resolution stops when it finds a binding, unless that binding is declared `nonlocal`). As part of this change, free variable resolution will now union the types it finds as it walks in enclosing scopes. This approach is still incomplete, because it doesn't consider inner scopes or sibling scopes, but it improves the common case. --------- Co-authored-by: Carl Meyer <carl@astral.sh>
Author
Parents
Loading