]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commitdiff
Fix typing of `revision` argument in "Don't Generate Empty Migrations with Autogenera... 1340/head
authorJohn T. Wodder II <git@varonathe.org>
Fri, 27 Oct 2023 15:00:25 +0000 (11:00 -0400)
committerJohn T. Wodder II <git@varonathe.org>
Fri, 27 Oct 2023 15:00:25 +0000 (11:00 -0400)
docs/build/cookbook.rst

index cde139146ee65a711676fab02c7d6ce6fc2ab5fa..fd84db0a8bc3434161502761e791253089984bd7 100644 (file)
@@ -901,6 +901,7 @@ single :class:`.MigrationScript` directive if it is empty of
 any operations::
 
     # for typing purposes
+    from collections.abc import Iterable
     from alembic.environment import MigrationContext
 
     # this typing-only import requires alembic 1.12.1 or above
@@ -913,7 +914,7 @@ any operations::
 
         def process_revision_directives(
             context: MigrationContext,
-            revision: tuple[str, str],
+            revision: str | Iterable[str | None] | Iterable[str],
             directives: list[MigrationScript],
         ):
             assert config.cmd_opts is not None