Repository navigation
fix(client-state): type global_set as the FunctionVar it returns - #7966
benedikt-bartscher wants to merge 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
|
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.