typing init and utils
This commit is contained in:
parent
c90583d8e5
commit
6183da6d8a
@ -84,6 +84,9 @@ In the example above, you will be able to do `rx.list`
|
|||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from types import ModuleType
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
from reflex.utils import (
|
from reflex.utils import (
|
||||||
compat, # for side-effects
|
compat, # for side-effects
|
||||||
lazy_loader,
|
lazy_loader,
|
||||||
@ -365,7 +368,7 @@ getattr, __dir__, __all__ = lazy_loader.attach(
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def __getattr__(name):
|
def __getattr__(name: ModuleType | Any):
|
||||||
if name == "chakra":
|
if name == "chakra":
|
||||||
from reflex.utils import console
|
from reflex.utils import console
|
||||||
|
|
||||||
|
@ -495,7 +495,7 @@ def empty_dir(path: str | Path, keep_files: list[str] | None = None):
|
|||||||
path_ops.rm(element)
|
path_ops.rm(element)
|
||||||
|
|
||||||
|
|
||||||
def is_valid_url(url) -> bool:
|
def is_valid_url(url: str) -> bool:
|
||||||
"""Check if a url is valid.
|
"""Check if a url is valid.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
Loading…
Reference in New Issue
Block a user