| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 9a44fc4 commit 5da82e2
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -814,7 +814,9 @@ class SQLModel(BaseModel, metaclass=SQLModelMetaclass, registry=default_registry | |||
| 814 | 814 | __allow_unmapped__ = True # https://docs.sqlalchemy.org/en/20/changelog/migration_20.html#migration-20-step-six | |
| 815 | 815 | model_config = SQLModelConfig(from_attributes=True) | |
| 816 | 816 | ||
| 817 | - def __new__(cls, *args: Any, **kwargs: Any) -> Any: | ||
| 817 | + # Typing spec says `__new__` returning `Any` overrides normal constructor | ||
| 818 | + # behavior, but a missing annotation does not: | ||
| 819 | + def __new__(cls, *args: Any, **kwargs: Any): # type: ignore[no-untyped-def] | ||
| 818 | 820 | new_object = super().__new__(cls) | |
| 819 | 821 | # SQLAlchemy doesn't call __init__ on the base class when querying from DB | |
| 820 | 822 | # Ref: https://docs.sqlalchemy.org/en/14/orm/constructors.html | |
| Back | FazBrowse Home | New Git URL |
0 commit comments