ruff/crates/ty_python_semantic/resources
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
..
corpus [ty] Fix panic for attribute expressions with empty value (#19069) 2025-07-09 08:46:33 +02:00
mdtest distinguish references from definitions in infer_nonlocal 2025-07-15 07:55:40 -07:00
primer [ty] Upgrade mypy_primer (#19207) 2025-07-08 15:56:54 +01: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.