Skip to content

Commit 2455394

Browse files
authored
fixing broken Pydantic v1 regression (#663)
* fixing broken Pydantic v1 regression * mypy thing
1 parent c5068e5 commit 2455394

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

aredis_om/model/encoders.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def jsonable_encoder(
9090
sqlalchemy_safe=sqlalchemy_safe,
9191
)
9292
if dataclasses.is_dataclass(obj):
93-
return dataclasses.asdict(obj) # type: ignore[call-overload]
93+
return dataclasses.asdict(obj) # type: ignore
9494
if isinstance(obj, Enum):
9595
return obj.value
9696
if isinstance(obj, PurePath):

aredis_om/model/model.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1432,7 +1432,8 @@ def outer_type_or_annotation(field):
14321432

14331433
class RedisModel(BaseModel, abc.ABC, metaclass=ModelMeta):
14341434
pk: Optional[str] = Field(default=None, primary_key=True)
1435-
ConfigDict: ClassVar
1435+
if PYDANTIC_V2:
1436+
ConfigDict: ClassVar
14361437

14371438
Meta = DefaultMeta
14381439

0 commit comments

Comments
 (0)