all _state_names should be classvars
This commit is contained in:
parent
0c406f4bac
commit
1b0577a7e1
@ -2290,7 +2290,9 @@ def dynamic(func: Callable[[T], Component]):
|
|||||||
class FrontendEventExceptionState(State):
|
class FrontendEventExceptionState(State):
|
||||||
"""Substate for handling frontend exceptions."""
|
"""Substate for handling frontend exceptions."""
|
||||||
|
|
||||||
_state_name: Optional[str] = constants.CompileVars.FRONTEND_EXCEPTION_STATE
|
_state_name: ClassVar[Optional[str]] = (
|
||||||
|
constants.CompileVars.FRONTEND_EXCEPTION_STATE
|
||||||
|
)
|
||||||
|
|
||||||
@event
|
@event
|
||||||
def handle_frontend_exception(self, stack: str, component_stack: str) -> None:
|
def handle_frontend_exception(self, stack: str, component_stack: str) -> None:
|
||||||
@ -2311,7 +2313,7 @@ class FrontendEventExceptionState(State):
|
|||||||
class UpdateVarsInternalState(State):
|
class UpdateVarsInternalState(State):
|
||||||
"""Substate for handling internal state var updates."""
|
"""Substate for handling internal state var updates."""
|
||||||
|
|
||||||
_state_name: Optional[str] = constants.CompileVars.UPDATE_VARS_INTERNAL
|
_state_name: ClassVar[Optional[str]] = constants.CompileVars.UPDATE_VARS_INTERNAL
|
||||||
|
|
||||||
async def update_vars_internal(self, vars: dict[str, Any]) -> None:
|
async def update_vars_internal(self, vars: dict[str, Any]) -> None:
|
||||||
"""Apply updates to fully qualified state vars.
|
"""Apply updates to fully qualified state vars.
|
||||||
@ -2338,7 +2340,7 @@ class OnLoadInternalState(State):
|
|||||||
This is a separate substate to avoid deserializing the entire state tree for every page navigation.
|
This is a separate substate to avoid deserializing the entire state tree for every page navigation.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
_state_name: Optional[str] = constants.CompileVars.ON_LOAD_INTERNAL
|
_state_name: ClassVar[Optional[str]] = constants.CompileVars.ON_LOAD_INTERNAL
|
||||||
|
|
||||||
def on_load_internal(self) -> list[Event | EventSpec] | None:
|
def on_load_internal(self) -> list[Event | EventSpec] | None:
|
||||||
"""Queue on_load handlers for the current page.
|
"""Queue on_load handlers for the current page.
|
||||||
|
Loading…
Reference in New Issue
Block a user