Skip to content

Commit 52ad213

Browse files
committed
fix: rename app param to app-name
1 parent efa83f6 commit 52ad213

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/fastapi_cli/cli.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def _run(
5858
workers: Union[int, None] = None,
5959
root_path: str = "",
6060
command: str,
61-
app: Union[str, None] = None,
61+
app_name: Union[str, None] = None,
6262
proxy_headers: bool = False,
6363
) -> None:
6464
try:
@@ -135,7 +135,7 @@ def dev(
135135
help="The root path is used to tell your app that it is being served to the outside world with some [bold]path prefix[/bold] set up in some termination proxy or similar."
136136
),
137137
] = "",
138-
app: Annotated[
138+
app_name: Annotated[
139139
Union[str, None],
140140
typer.Option(
141141
help="The name of the variable that contains the [bold]FastAPI[/bold] app in the imported module or package. If not provided, it is detected automatically."
@@ -179,7 +179,7 @@ def dev(
179179
port=port,
180180
reload=reload,
181181
root_path=root_path,
182-
app=app,
182+
app_name=app_name,
183183
command="dev",
184184
proxy_headers=proxy_headers,
185185
)
@@ -224,7 +224,7 @@ def run(
224224
help="The root path is used to tell your app that it is being served to the outside world with some [bold]path prefix[/bold] set up in some termination proxy or similar."
225225
),
226226
] = "",
227-
app: Annotated[
227+
app_name: Annotated[
228228
Union[str, None],
229229
typer.Option(
230230
help="The name of the variable that contains the [bold]FastAPI[/bold] app in the imported module or package. If not provided, it is detected automatically."
@@ -269,7 +269,7 @@ def run(
269269
reload=reload,
270270
workers=workers,
271271
root_path=root_path,
272-
app=app,
272+
app_name=app_name,
273273
command="run",
274274
proxy_headers=proxy_headers,
275275
)

tests/test_cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def test_dev_args() -> None:
5555
"--no-reload",
5656
"--root-path",
5757
"/api",
58-
"--app",
58+
"--app-name",
5959
"api",
6060
"--no-proxy-headers",
6161
],
@@ -125,7 +125,7 @@ def test_run_args() -> None:
125125
"2",
126126
"--root-path",
127127
"/api",
128-
"--app",
128+
"--app-name",
129129
"api",
130130
"--no-proxy-headers",
131131
],

0 commit comments

Comments
 (0)