Nothing stuck out to me when perusing through the code
Edit: seems pylance can figure it out but mypy can't, maybe pylance is special casing something?
from typing import Optional
from sqlmodel import Field, SQLModel
class Hero(SQLModel, table=True):
id: Optional[int] = Field(default=None, primary_key=True)
name: str
secret_name: str
age: Optional[int] = None
reveal_type(Hero.__init__)
# pylance: Type of "Hero.__init__" is "(self: Hero, *, id: int | None = Field(default=None, primary_key=True), name: str, secret_name: str, age: int | None = None) -> None"
# mypy: main.py:18:13: note: Revealed type is "def (__pydantic_self__: sqlmodel.main.SQLModel, **data: Any)"