[ty] Implement `global` handling and `load-before-global-declaration` syntax error #17637
[red-knot] Copy and paste ruff's `global` handling
6cd7c58b
refactor globals handling, resolve invalid-assignments, break errors
f359e77d
fix unresolved-reference todo
87b177e0
resolve the last typing todo
2f211bfb
emit syntax errors on `global` lines
bef6172f
tidy up
96443aad
use Alex's globals_per_scope idea
11f48052
use a HashSet instead of Map, range is unused
6e6422d1
ntBre
force pushed
from
ffcd7cd9
to
6e6422d1
235 days ago
apply suggestion
f35849e9
try adding an mdtest to reproduce the issue
fc0e3375
try Alex's suggestion here too
361fa8c4
Merge branch 'main' into brent/simple-red-knot-globals
c4ea9224
Merge branch 'main' into brent/simple-red-knot-globals
4cdb7543
clean up outdated comment
5f9867e1
use a type alias instead of very thin wrapper struct
16b19f10
use FileScopeId::is_global
610f0506
ntBre
changed the title [red-knot] Copy and paste ruff's `global` handling [ty] Implement `global` handling and `load-before-global-declaration` syntax error 232 days ago
ntBre
marked this pull request as ready for review 232 days ago
store ScopedSymbolId instead of Name
5cda462e
fix docs reference to Globals
e3193bfb
carljm
approved these changes
on 2025-05-07
Separate mdtest cases, add more descriptive names
b5dc8c4f
print -> reveal_type in final case
899ffb3c
apply docs suggestion
d0f95200
factor out TypeInferenceBuilder::skip_non_global_scopes
9aef28a7
add TODO for annotated global
6d18f68c
carljm
approved these changes
on 2025-05-08
ntBre
merged
57bf7dfb
into main 230 days ago
ntBre
deleted the brent/simple-red-knot-globals branch 230 days ago
Assignees
No one assigned
Login to write a write a comment.
Login via GitHub