]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Fix the type annotation of MetaData.reflect's argument `only` (#10352)
authorMarkus Hauru <markus@mhauru.org>
Sat, 16 Sep 2023 08:31:43 +0000 (10:31 +0200)
committerGitHub <noreply@github.com>
Sat, 16 Sep 2023 08:31:43 +0000 (10:31 +0200)
lib/sqlalchemy/sql/schema.py

index de6507145d72bcc04167f2544aded56b8c13a758..56d652dbb170f0bdb68d021be34e208de1451048 100644 (file)
@@ -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,