Skip to content

Commit

Permalink
fix: typing python 3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
FlavienRx committed Nov 10, 2024
1 parent 59adb00 commit f45dccf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/fastapi_cli/discover.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from dataclasses import dataclass
from logging import getLogger
from pathlib import Path
from typing import Union
from typing import Tuple, Union

from rich import print
from rich.padding import Padding
Expand Down Expand Up @@ -100,7 +100,7 @@ def get_module_data_from_path(path: Path) -> ModuleData:

def get_app_name_add_app(
*, mod_data: ModuleData, app_name: Union[str, None] = None
) -> tuple[str, FastAPI]:
) -> Tuple[str, FastAPI]:
try:
mod = importlib.import_module(mod_data.module_import_str)
except (ImportError, ValueError) as e:
Expand Down Expand Up @@ -140,7 +140,7 @@ def get_app_name_add_app(

def get_import_string_and_app(
*, path: Union[Path, None] = None, app_name: Union[str, None] = None
) -> tuple[str, FastAPI]:
) -> Tuple[str, FastAPI]:
if not path:
path = get_default_path()
logger.info(f"Using path [blue]{path}[/blue]")
Expand Down

0 comments on commit f45dccf

Please sign in to comment.