Skip to content

Commit 854c037

Browse files
committed
fix: Use typing.Tuple for 3.8
1 parent d26962b commit 854c037

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/fastapi_cli/discover.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from dataclasses import dataclass
44
from logging import getLogger
55
from pathlib import Path
6-
from typing import Any, Callable, Union, get_type_hints
6+
from typing import Any, Callable, Tuple, Union, get_type_hints
77

88
from rich import print
99
from rich.padding import Padding
@@ -100,7 +100,7 @@ def get_module_data_from_path(path: Path) -> ModuleData:
100100

101101
def get_app_name(
102102
*, mod_data: ModuleData, app_name: Union[str, None] = None
103-
) -> tuple[str, bool]:
103+
) -> Tuple[str, bool]:
104104
try:
105105
mod = importlib.import_module(mod_data.module_import_str)
106106
except (ImportError, ValueError) as e:
@@ -154,7 +154,7 @@ def check_factory(fn: Callable[[], Any]) -> bool:
154154

155155
def get_import_string(
156156
*, path: Union[Path, None] = None, app_name: Union[str, None] = None
157-
) -> tuple[str, bool]:
157+
) -> Tuple[str, bool]:
158158
if not path:
159159
path = get_default_path()
160160
logger.info(f"Using path [blue]{path}[/blue]")

0 commit comments

Comments
 (0)