add proper pydantic v2 FieldInfo annotation
This commit is contained in:
parent
32bc17b757
commit
99c28f8433
@ -4,6 +4,7 @@ from __future__ import annotations
|
|||||||
import os
|
import os
|
||||||
from typing import Any, Callable, Dict, Optional, Type, Union
|
from typing import Any, Callable, Dict, Optional, Type, Union
|
||||||
from urllib.parse import urlparse
|
from urllib.parse import urlparse
|
||||||
|
from pydantic.fields import FieldInfo
|
||||||
|
|
||||||
from reflex import constants
|
from reflex import constants
|
||||||
from reflex.components.base import (
|
from reflex.components.base import (
|
||||||
@ -147,7 +148,7 @@ def compile_state(state: Type[BaseState]) -> dict:
|
|||||||
|
|
||||||
|
|
||||||
def _compile_client_storage_field(
|
def _compile_client_storage_field(
|
||||||
field,
|
field: FieldInfo,
|
||||||
) -> tuple[Type[Cookie] | Type[LocalStorage] | None, dict[str, Any] | None]:
|
) -> tuple[Type[Cookie] | Type[LocalStorage] | None, dict[str, Any] | None]:
|
||||||
"""Compile the given cookie or local_storage field.
|
"""Compile the given cookie or local_storage field.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user