From e9bdd1adefd873e71bc23e109a419d6389ca5572 Mon Sep 17 00:00:00 2001 From: Federico Caselli Date: Sat, 22 Oct 2022 09:57:18 +0200 Subject: [PATCH] DeclarativeBase ``__table__`` annotation is not optional Change-Id: I92bfc0cf58fa2e6f9d7e8055f1a337ec806c1410 --- lib/sqlalchemy/orm/decl_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.47.2