ruff/crates/ty_python_semantic/resources/mdtest/scopes
Jack O'Connor 5f2e855c29 allow reads of "free" variables to refer to a global declaration
Previously this worked if there was also a binding in the same scope as
the `global` declaration (probably almost always the case), but CPython
doesn't require this.

This change surfaced an error in an existing test, where a global
variable was only ever declared and bound using the `global` keyword,
and never mentioned explicitly in the global scope. @AlexWaygood
suggested we probably want to keep that requirement, so I'm adding an a
new test for that on top of fixing the failing test.
2025-07-16 08:30:42 -07:00
..
builtin.md [ty] Infer nonlocal types as unions of all reachable bindings (#18750) 2025-06-26 12:24:40 +02:00
eager.md [ty] Infer nonlocal types as unions of all reachable bindings (#18750) 2025-06-26 12:24:40 +02:00
global-constants.md [ty] Add support for global __debug__ constant (#18540) 2025-06-10 06:48:59 +00:00
global.md lint on the global keyword if there's no explicit definition in the global scope 2025-07-15 16:56:54 -07:00
moduletype_attrs.md [ty] support accessing __builtins__ global (#18118) 2025-05-15 22:01:38 +02:00
nonlocal.md allow reads of "free" variables to refer to a global declaration 2025-07-16 08:30:42 -07:00
unbound.md Update class literal display to use <class 'Foo'> style (#17889) 2025-05-06 20:11:25 -04:00