[ty] make del x force local resolution of x in the current scope by oconnor663 · Pull Request #19389 · astral-sh/ruff (original) (raw)
oconnor663 added the ty
Multi-file analysis & type inference
label
Fixes astral-sh/ty#769.
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.
carljm deleted the del_mark_bound branch
UnboundVariable pushed a commit to UnboundVariable/ruff that referenced this pull request
- main:
[ty] Avoid secondary tree traversal to get call expression for keyword arguments (astral-sh#19429)
[ty] Add goto definition to playground (astral-sh#19425)
[ty] Add support for
@warnings.deprecated(astral-sh#19376) [ty] makedel xforce local resolution ofxin the current scope (astral-sh#19389)
Conflicts:
crates/ty_ide/src/goto.rs
dcreager added a commit that referenced this pull request
- main: (25 commits)
[ty] Sync vendored typeshed stubs (#19461)
[ty] Extend tuple
__len__and__bool__special casing to also cover tuple subclasses (#19289) [ty] bump docstring-adder pin (#19458) [ty] Disallow assignment toFinalclass attributes (#19457) Update dependency ruff to v0.12.4 (#19442) Update pre-commit hook astral-sh/ruff-pre-commit to v0.12.4 (#19443) Update rui314/setup-mold digest to 702b190 (#19441) Update taiki-e/install-action action to v2.56.19 (#19448) Update Rust crate strum_macros to v0.27.2 (#19447) Update Rust crate strum to v0.27.2 (#19446) Update Rust crate rand to v0.9.2 (#19444) Update Rust crate serde_json to v1.0.141 (#19445) Fixunreachablepanic in parser (#19183) [ruff] Support byte strings (RUF055) (#18926) [ty] Avoid second lookup forinfer_maybe_standalone_expression(#19439) [ty] Implemented "go to definition" support for import statements (#19428) [ty] Avoid secondary tree traversal to get call expression for keyword arguments (#19429) [ty] Add goto definition to playground (#19425) [ty] Add support for@warnings.deprecated(#19376) [ty] makedel xforce local resolution ofxin the current scope (#19389) ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})