From 3e41095df02c911014ed15b0b00e97a2c6845518 Mon Sep 17 00:00:00 2001 From: Masen Furer Date: Tue, 30 Apr 2024 12:52:14 -0700 Subject: [PATCH] fix vars.pyi manually --- reflex/vars.pyi | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/reflex/vars.pyi b/reflex/vars.pyi index fb2ed4657..f4253a7d5 100644 --- a/reflex/vars.pyi +++ b/reflex/vars.pyi @@ -9,7 +9,7 @@ from reflex.base import Base as Base from reflex.state import State as State from reflex.state import BaseState as BaseState from reflex.utils import console as console, format as format, types as types -from reflex.utils.imports import ImportVar +from reflex.utils.imports import ImportDict, ImportList, ImportVar from types import FunctionType from typing import ( Any, @@ -35,9 +35,18 @@ def _extract_var_data(value: Iterable) -> list[VarData | None]: ... class VarData(Base): state: str - imports: dict[str, set[ImportVar]] + imports: ImportList hooks: Dict[str, None] interpolations: List[Tuple[int, int]] + def __init__( + self, + imports: ImportList + | List[ImportVar | Dict[str, Optional[Union[str, bool]]]] + | ImportDict + | Dict[str, set[ImportVar]] + | None = None, + **kwargs, + ): ... @classmethod def merge(cls, *others: VarData | None) -> VarData | None: ...