ruff
[ty] Implement `global` handling and `load-before-global-declaration` syntax error
#17637
Merged

[ty] Implement `global` handling and `load-before-global-declaration` syntax error #17637

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

Login to write a write a comment.

Login via GitHub

Assignees
No one assigned
Labels
Milestone