Skip to content

Commit 6f5f5b9

Browse files
committed
🚚 Rename log references from FastAPI object to FastAPI app
1 parent 9c25aab commit 6f5f5b9

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/fastapi_cli/discover.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,7 @@ def get_app_name(*, mod_data: ModuleData, app_name: Union[str, None] = None) ->
129129
obj = getattr(mod, name)
130130
if isinstance(obj, FastAPI):
131131
return name
132-
raise FastAPICLIException(
133-
"Could not find FastAPI object in module, try using --app"
134-
)
132+
raise FastAPICLIException("Could not find FastAPI app in module, try using --app")
135133

136134

137135
def get_import_string(
@@ -152,13 +150,13 @@ def get_import_string(
152150
import_panel = Padding(
153151
Panel(
154152
import_example,
155-
title="[b green]Importable FastAPI object[/b green]",
153+
title="[b green]Importable FastAPI app[/b green]",
156154
expand=False,
157155
padding=(1, 2),
158156
),
159157
1,
160158
)
161-
logger.info("Found importable FastAPI object")
159+
logger.info("Found importable FastAPI app")
162160
print(import_panel)
163161
import_string = f"{mod_data.module_import_str}:{use_app_name}"
164162
logger.info(f"Using import string [b green]{import_string}[/b green]")

0 commit comments

Comments
 (0)