]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commitdiff
always add positionals 1611/head
authorMikhail Bulash <scaryspiderpig@proton.me>
Mon, 28 Apr 2025 11:18:14 +0000 (13:18 +0200)
committerMikhail Bulash <scaryspiderpig@proton.me>
Mon, 28 Apr 2025 11:18:14 +0000 (13:18 +0200)
alembic/config.py

index 47fdb3f8da470417b6cfdbc5e31dd4d1c51e2b41..f1411680d59fadfe8dead5aad34698a36a423828 100644 (file)
@@ -584,9 +584,8 @@ class CommandLine:
                 subparser.add_argument(*args, **opts)  # type:ignore
 
         for arg in positional:
-            if arg in self._POSITIONAL_OPTS:
-                opts = self._POSITIONAL_OPTS[arg]
-                subparser.add_argument(arg, **opts)  # type:ignore
+            opts = self._POSITIONAL_OPTS.get(arg, {})
+            subparser.add_argument(arg, **opts)  # type:ignore
 
     def _inspect_function(self, fn: CommandFunction) -> tuple[Any, Any, str]:
         spec = compat.inspect_getfullargspec(fn)