We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5617ed4 commit 8726338Copy full SHA for 8726338
1 file changed
src/fastapi_cli/cli.py
@@ -5,6 +5,7 @@
5
6
import typer
7
import uvicorn
8
+from fastapi import FastAPI
9
from rich import print
10
from rich.padding import Padding
11
from rich.panel import Panel
@@ -46,11 +47,11 @@ def callback(
46
47
"""
48
49
-def _get_docs_url(uvicorn_path: str) -> str:
50
+def _get_docs_url(uvicorn_path: str) -> str | None:
51
module_path, app_name = uvicorn_path.split(sep=":")
52
module = importlib.import_module(module_path)
- app = getattr(module, app_name)
53
- return app.docs_url
+ fastapi_app: FastAPI = getattr(module, app_name)
54
+ return fastapi_app.docs_url
55
56
57
def _run(
0 commit comments