reflex.event: revert future annotation changes#6254
Conversation
Go back to string-based annotations, to unbreak reflex-web
Greptile SummaryThis PR reverts the Key changes:
Confidence Score: 5/5Safe to merge β this is a focused, mechanical revert with all forward references correctly wrapped in string literals. All changed annotations have been reviewed: every forward reference (types defined later in the file) and every TYPE_CHECKING-only import is now in string form, while annotations referencing directly-imported types remain unquoted. No logic, behavior, or public API is altered. No P0/P1 findings. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["from __future__ import annotations\n(removed)"] -->|"was lazily evaluated"| B["All annotations treated as strings at runtime"]
B -->|"revert"| C["Explicit string literals added to\nforward-reference annotations"]
C --> D1["'EventHandler' β used before class def at line 274"]
C --> D2["'EventSpec' β used before class def at line 407"]
C --> D3["'EventVar'/'EventCallback' β forward refs in EventChain.events"]
C --> D4["'EventType' β TypeAliasType defined at line 2483, used earlier"]
C --> D5["'BaseState' β only imported under TYPE_CHECKING"]
D1 & D2 & D3 & D4 & D5 --> E["Annotations correctly resolved\nat runtime without __future__"]
Reviews (1): Last reviewed commit: "reflex.event: revert future annotation c..." | Re-trigger Greptile |
this allows the test to run with the actual proposed reflex version instead of replacing it back to main
Go back to string-based annotations, to unbreak reflex-web