From: Federico Caselli Date: Sat, 22 Oct 2022 07:57:18 +0000 (+0200) Subject: DeclarativeBase ``__table__`` annotation is not optional X-Git-Tag: rel_2_0_0b3~33^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e9bdd1adefd873e71bc23e109a419d6389ca5572;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git DeclarativeBase ``__table__`` annotation is not optional Change-Id: I92bfc0cf58fa2e6f9d7e8055f1a337ec806c1410 --- diff --git a/lib/sqlalchemy/orm/decl_api.py b/lib/sqlalchemy/orm/decl_api.py index e4a89cc80b..94c5181de3 100644 --- a/lib/sqlalchemy/orm/decl_api.py +++ b/lib/sqlalchemy/orm/decl_api.py @@ -682,7 +682,7 @@ class DeclarativeBase( __name__: ClassVar[str] __mapper__: ClassVar[Mapper[Any]] - __table__: ClassVar[Optional[FromClause]] + __table__: ClassVar[FromClause] # pyright/pylance do not consider a classmethod a ClassVar so use Any # https://github.com/microsoft/pylance-release/issues/3484