Skip to content

Commit 9de3d86

Browse files
committed
keep Dict for now, but use type:ignore to silence
1 parent 66297ee commit 9de3d86

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

sqlmodel/main.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -598,15 +598,11 @@ def sqlmodel_rebuild(cls) -> None:
598598
reg._dispose_manager_and_mapper(m)
599599
del reg._managers[m]
600600

601-
return cls.__do_init__(cls.__name__, cls.__bases__, cls.__dict__)
601+
return cls.__do_init__(cls.__name__, cls.__bases__, cls.__dict__) # type: ignore (Dict vs Mapping)
602602

603603
# Override SQLAlchemy, allow both SQLAlchemy and plain Pydantic models
604604
def __do_init__(
605-
cls,
606-
classname: str,
607-
bases: Tuple[type, ...],
608-
dict_: Mapping[str, Any],
609-
**kw: Any,
605+
cls, classname: str, bases: Tuple[type, ...], dict_: Dict[str, Any], **kw: Any
610606
) -> None:
611607
# Only one of the base classes (or the current one) should be a table model
612608
# this allows FastAPI cloning a SQLModel for the response_model without

0 commit comments

Comments
 (0)