Răsfoiți Sursa

ModelField doesn't exist in pydantic v2

Benedikt Bartscher 1 an în urmă
părinte
comite
6d3809efcb
1 a modificat fișierele cu 1 adăugiri și 3 ștergeri
  1. 1 3
      reflex/compiler/utils.py

+ 1 - 3
reflex/compiler/utils.py

@@ -5,8 +5,6 @@ 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 ModelField
-
 from reflex import constants
 from reflex import constants
 from reflex.components.base import (
 from reflex.components.base import (
     Body,
     Body,
@@ -149,7 +147,7 @@ def compile_state(state: Type[BaseState]) -> dict:
 
 
 
 
 def _compile_client_storage_field(
 def _compile_client_storage_field(
-    field: ModelField,
+    field,
 ) -> 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.