mirror of
https://github.com/astral-sh/ruff.git
synced 2025-11-20 04:29:47 +00:00
## Summary This is a follow-up to #19321. If we try to access a class variable before it is defined, the variable is looked up in the global scope, rather than in any enclosing scopes. Closes https://github.com/astral-sh/ty/issues/875. ## Test Plan New tests in `narrow/conditionals/nested.md`. |
||
|---|---|---|
| .. | ||
| conditionals | ||
| assert.md | ||
| assignment.md | ||
| bool-call.md | ||
| boolean.md | ||
| complex_target.md | ||
| hasattr.md | ||
| isinstance.md | ||
| issubclass.md | ||
| match.md | ||
| post_if_statement.md | ||
| truthiness.md | ||
| type.md | ||
| type_guards.md | ||
| while.md | ||