ruff/crates/ty_python_semantic/src/semantic_index
Jack O'Connor a357a68fc9 distinguish references from definitions in infer_nonlocal
The initial implementation of `infer_nonlocal` landed in
https://github.com/astral-sh/ruff/pull/19112 fails to report an error
for this example:

```py
x = 1
def f():
    # This is only a usage of `x`, not a definition. It shouldn't be
    # enough to make the `nonlocal` statement below allowed.
    print(x)
    def g():
        nonlocal x
```

Fix this by continuing to walk enclosing scopes when the place we've
found isn't bound, declared, or `nonlocal`.
2025-07-15 07:55:40 -07:00
..
builder Rename Red Knot (#17820) 2025-05-03 19:49:15 +02:00
use_def [ty] Eagerly simplify 'True' and 'False' constraints (#18998) 2025-06-30 13:11:52 +02:00
ast_ids.rs [ty] Remove ScopedExpressionId (#19019) 2025-07-02 17:57:32 +02:00
builder.rs [ty] Make use of salsa Lookup when interning values (#19347) 2025-07-15 09:54:43 +02:00
definition.rs [ty] Initial implementation of signature help provider (#19194) 2025-07-10 19:32:00 -07:00
expression.rs [ty] Remove countme from salsa-structs (#19257) 2025-07-10 11:45:09 +00:00
narrowing_constraints.rs [ty] Add environment variable to dump Salsa memory usage stats (#18928) 2025-06-26 21:27:51 +00:00
place.rs distinguish references from definitions in infer_nonlocal 2025-07-15 07:55:40 -07:00
predicate.rs [ty] Remove countme from salsa-structs (#19257) 2025-07-10 11:45:09 +00:00
re_exports.rs Update Rust toolchain to 1.88 and MSRV to 1.86 (#19011) 2025-06-28 20:24:00 +02:00
reachability_constraints.rs [ty] Correctly handle calls to functions marked as returning Never / NoReturn (#18333) 2025-07-04 11:52:52 -07:00
use_def.rs [ty] Enforce typing.Final (#19178) 2025-07-08 16:26:09 +02:00