Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit f45dccf

Browse files
fix: typing python 3.8
1 parent 59adb00 commit f45dccf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎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 Union
6+
from typing import Tuple, Union
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_add_app(
102102
*, mod_data: ModuleData, app_name: Union[str, None] = None
103-
) -> tuple[str, FastAPI]:
103+
) -> Tuple[str, FastAPI]:
104104
try:
105105
mod = importlib.import_module(mod_data.module_import_str)
106106
except (ImportError, ValueError) as e:
@@ -140,7 +140,7 @@ def get_app_name_add_app(
140140

141141
def get_import_string_and_app(
142142
*, path: Union[Path, None] = None, app_name: Union[str, None] = None
143-
) -> tuple[str, FastAPI]:
143+
) -> Tuple[str, FastAPI]:
144144
if not path:
145145
path = get_default_path()
146146
logger.info(f"Using path [blue]{path}[/blue]")

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /