mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-08 12:48:07 +00:00
![]() 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. |
||
---|---|---|
.. | ||
builtin.md | ||
eager.md | ||
global-constants.md | ||
global.md | ||
moduletype_attrs.md | ||
nonlocal.md | ||
unbound.md |