From: Markus Hauru Date: Sat, 16 Sep 2023 08:31:43 +0000 (+0200) Subject: Fix the type annotation of MetaData.reflect's argument `only` (#10352) X-Git-Tag: rel_2_0_21~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4a121f07d4224eb995c73926ca0921995edb05a0;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git Fix the type annotation of MetaData.reflect's argument `only` (#10352) --- diff --git a/lib/sqlalchemy/sql/schema.py b/lib/sqlalchemy/sql/schema.py index de6507145d..56d652dbb1 100644 --- a/lib/sqlalchemy/sql/schema.py +++ b/lib/sqlalchemy/sql/schema.py @@ -5611,7 +5611,9 @@ class MetaData(HasSchemaAttr): bind: Union[Engine, Connection], schema: Optional[str] = None, views: bool = False, - only: Optional[_typing_Sequence[str]] = None, + only: Union[ + _typing_Sequence[str], Callable[[str, MetaData], bool], None + ] = None, extend_existing: bool = False, autoload_replace: bool = True, resolve_fks: bool = True,