Repository navigation
fix(client-state): type global_set as the FunctionVar it returns - #7966
FarhanAliRaza merged 1 commit into
Conversation
global_set builds its setter with `.to(FunctionVar)` but was annotated `-> Var`, so calling it needed another `.to(FunctionVar)` to type-check. The playwright test app called it that way; it now calls `.call(...)` directly, which pyright rejects without the annotation.
[Low impact] This PR appears safe to merge. SummaryCorrects
Reviews (2) · Last reviewed commit: "fix(client-state): type global_set as th..." · Reviewed by Greptile |
Merging this PR will not alter performance1 warning
Comparing Footnotes
|
reflex-dev#7966 dropped the FunctionVar import while reflex-dev#7946 still used it here, so ruff reports an undefined name on main.
* perf(net): migrate first-party HTTP clients to HTTPX2 * fix(deps): keep httpx installed until 1.0 Downstream packages import httpx without declaring it and relied on reflex installing it (reflex-google-auth, the api_admin_panel template, reflex-examples). Keep the dependency for a deprecation period while Reflex itself uses httpx2, and switch the remaining docs snippets to httpx2. * fix(deps): re-floor reflex-hosting-cli at the 0.2.2.post1 release Main cut reflex-hosting-cli-v0.2.2.post1, so the workspace CLI now builds as 0.2.2.post2.devN, below the 0.2.3.dev0 floor. * test(client-state): call global_set directly in script_set_shared #7966 dropped the FunctionVar import while #7946 still used it here, so ruff reports an undefined name on main. * fix(deps): drop httpx from reflex dependencies Reflex uses httpx2 only. Code that imports httpx must declare it. * test(client-state): drop unused FunctionVar import Claude-Session: https://claude.ai/code/session_01LwJUCTbLruuE8U6njhtwyu --------- Co-authored-by: Masen Furer <m_github@0x26.net>
ClientStateVar.global_setreturns aFunctionVar(.to(FunctionVar)), but it was annotated-> Var. Calling the setter therefore needed a second cast to type-check:The annotation is now
-> FunctionVar. The client state playwright app called the setter with the extra.to(FunctionVar); it now calls.call(...)directly, which pyright rejects without the new annotation. No runtime change.