Skip to content

Commit 8726338

Browse files
committed
style: linter
1 parent 5617ed4 commit 8726338

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/fastapi_cli/cli.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
import typer
77
import uvicorn
8+
from fastapi import FastAPI
89
from rich import print
910
from rich.padding import Padding
1011
from rich.panel import Panel
@@ -46,11 +47,11 @@ def callback(
4647
"""
4748

4849

49-
def _get_docs_url(uvicorn_path: str) -> str:
50+
def _get_docs_url(uvicorn_path: str) -> str | None:
5051
module_path, app_name = uvicorn_path.split(sep=":")
5152
module = importlib.import_module(module_path)
52-
app = getattr(module, app_name)
53-
return app.docs_url
53+
fastapi_app: FastAPI = getattr(module, app_name)
54+
return fastapi_app.docs_url
5455

5556

5657
def _run(

0 commit comments

Comments
 (0)