typing init and utils

This commit is contained in:
Lendemor 2024-11-20 20:53:05 +01:00
parent c90583d8e5
commit 6183da6d8a
2 changed files with 5 additions and 2 deletions

View File

@ -84,6 +84,9 @@ In the example above, you will be able to do `rx.list`
from __future__ import annotations
from types import ModuleType
from typing import Any
from reflex.utils import (
compat, # for side-effects
lazy_loader,
@ -365,7 +368,7 @@ getattr, __dir__, __all__ = lazy_loader.attach(
)
def __getattr__(name):
def __getattr__(name: ModuleType | Any):
if name == "chakra":
from reflex.utils import console

View File

@ -495,7 +495,7 @@ def empty_dir(path: str | Path, keep_files: list[str] | None = None):
path_ops.rm(element)
def is_valid_url(url) -> bool:
def is_valid_url(url: str) -> bool:
"""Check if a url is valid.
Args: