]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commitdiff
fix overload typing
authorVincent Fazio <vfazio@gmail.com>
Fri, 30 Dec 2022 22:59:01 +0000 (16:59 -0600)
committerVincent Fazio <vfazio@xes-inc.com>
Fri, 30 Dec 2022 23:02:27 +0000 (17:02 -0600)
Signed-off-by: Vincent Fazio <vfazio@gmail.com>
alembic/runtime/environment.py

index 44dcd72db1e3fcdfdbedf2b9c52a06295ab39938..a441d1fd53739df3e1375d084defb01d377334aa 100644 (file)
@@ -269,15 +269,17 @@ class EnvironmentContext(util.ModuleClsProxy):
         return self.context_opts.get("tag", None)
 
     @overload
-    def get_x_argument(  # type:ignore[misc]
-        self, as_dictionary: Literal[False] = ...
-    ) -> List[str]:
+    def get_x_argument(self, as_dictionary: Literal[False]) -> List[str]:
         ...
 
     @overload
-    def get_x_argument(  # type:ignore[misc]
-        self, as_dictionary: Literal[True] = ...
-    ) -> Dict[str, str]:
+    def get_x_argument(self, as_dictionary: Literal[True]) -> Dict[str, str]:
+        ...
+
+    @overload
+    def get_x_argument(
+        self, as_dictionary: bool = ...
+    ) -> Union[List[str], Dict[str, str]]:
         ...
 
     def get_x_argument(