Skip to content

Commit fab6b65

Browse files
committed
formatting
1 parent ab09bb8 commit fab6b65

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

src/textual_dev/cli.py

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -226,30 +226,38 @@ def _run_app(
226226
else:
227227
run_app(import_name, args, environment)
228228

229+
229230
@run.command("serve")
230231
@click.argument("command")
231232
@click.option("-h", "--host", type=str, default="localhost", help="Host to serve on")
232233
@click.option("-p", "--port", type=int, default=8000, help="Port of server")
233-
@click.option("-t", "--title", type=str, default="Textual App", help="Name of the app being served")
234+
@click.option(
235+
"-t",
236+
"--title",
237+
type=str,
238+
default="Textual App",
239+
help="Name of the app being served",
240+
)
234241
@click.option("-u", "--url", type=str, default=None, help="Public URL")
235242
@click.option("--dev", type=bool, default=False, is_flag=True, help="Enable debug mode")
236-
237-
def serve(command:str, host:str, port:int, title:str, url:str | None, dev:bool) -> None:
243+
def serve(
244+
command: str, host: str, port: int, title: str, url: str | None, dev: bool
245+
) -> None:
238246
"""Run a local web server to serve the application.
239-
247+
240248
The command to run should be appended to "textual serve", and should include any python invocation.
241249
242250
textual serve "python -m textual"
243251
244252
You may also want to add the `--dev` switch, which will enable textual devtools.
245253
246254
textual serve --dev "python -m textual"
247-
248-
255+
256+
249257
"""
250258
from textual_serve.server import Server
251-
252-
server = Server(command, host, port, title=title, public_url=url)
259+
260+
server = Server(command, host, port, title=title, public_url=url)
253261
server.serve(debug=dev)
254262

255263

0 commit comments

Comments
 (0)