From d1ad4ceb1f3982a7fcaba273b67f6f76b793dfee Mon Sep 17 00:00:00 2001 From: Arun Sharma Date: Fri, 28 Feb 2025 20:30:50 -0800 Subject: [PATCH] Try to fix mypy --- sqlmodel/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sqlmodel/main.py b/sqlmodel/main.py index 8da6cfe65a..c276fe4ac2 100644 --- a/sqlmodel/main.py +++ b/sqlmodel/main.py @@ -598,11 +598,11 @@ def sqlmodel_rebuild(cls) -> None: reg._dispose_manager_and_mapper(m) del reg._managers[m] - return cls.__do_init__(cls.name, cls.__bases__, cls.__dict__) + return cls.__do_init__(cls.__name__, cls.__bases__, cls.__dict__) # Override SQLAlchemy, allow both SQLAlchemy and plain Pydantic models def __do_init__( - cls, classname: str, bases: Tuple[type, ...], dict_: Dict[str, Any], **kw: Any + cls, classname: str, bases: Tuple[type, ...], dict_: Mapping[str, Any], **kw: Any ) -> None: # Only one of the base classes (or the current one) should be a table model # this allows FastAPI cloning a SQLModel for the response_model without