]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commitdiff
Update annotation to allow PathLike 1173/head
authorSam Bull <aa6bs0@sambull.org>
Sun, 12 Feb 2023 22:12:39 +0000 (22:12 +0000)
committerGitHub <noreply@github.com>
Sun, 12 Feb 2023 22:12:39 +0000 (22:12 +0000)
alembic/config.py

index ac27d585bed2731833a43a1fe67a159581f785ed..338769b29fa576c121362f25892a755be8668d0a 100644 (file)
@@ -10,6 +10,7 @@ from typing import Dict
 from typing import Optional
 from typing import overload
 from typing import TextIO
+from typing import Union
 
 from . import __version__
 from . import command
@@ -93,7 +94,7 @@ class Config:
 
     def __init__(
         self,
-        file_: Optional[str] = None,
+        file_: Union[str, os.PathLike[str], None] = None,
         ini_section: str = "alembic",
         output_buffer: Optional[TextIO] = None,
         stdout: TextIO = sys.stdout,
@@ -123,7 +124,7 @@ class Config:
 
     """
 
-    config_file_name: Optional[str] = None
+    config_file_name: Union[str, os.PathLike[str], None] = None
     """Filesystem path to the .ini file in use."""
 
     config_ini_section: str = None  # type:ignore[assignment]