File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 25
25
def use_pydantic_2_plus ():
26
26
return True
27
27
28
- from pydantic import BaseModel , ConfigDict , TypeAdapter
28
+ from pydantic import BaseModel , TypeAdapter
29
29
from pydantic import ValidationError as ValidationError
30
30
from pydantic import validator
31
31
from pydantic ._internal ._model_construction import ModelMetaclass
Original file line number Diff line number Diff line change 11
11
AbstractSet ,
12
12
Any ,
13
13
Callable ,
14
+ ClassVar ,
14
15
Dict ,
15
16
List ,
16
17
Mapping ,
32
33
from ulid import ULID
33
34
34
35
from .. import redis
35
- from .._compat import PYDANTIC_V2 , BaseModel , ConfigDict
36
+ from .._compat import PYDANTIC_V2 , BaseModel
36
37
from .._compat import FieldInfo as PydanticFieldInfo
37
38
from .._compat import (
38
39
ModelField ,
@@ -1419,10 +1420,13 @@ def outer_type_or_annotation(field):
1419
1420
1420
1421
class RedisModel (BaseModel , abc .ABC , metaclass = ModelMeta ):
1421
1422
pk : Optional [str ] = Field (default = None , primary_key = True )
1423
+ ConfigDict : ClassVar
1422
1424
1423
1425
Meta = DefaultMeta
1424
1426
1425
1427
if PYDANTIC_V2 :
1428
+ from pydantic import ConfigDict
1429
+
1426
1430
model_config = ConfigDict (
1427
1431
from_attributes = True , arbitrary_types_allowed = True , extra = "allow"
1428
1432
)
You can’t perform that action at this time.
0 commit comments