clan join: init
This commit is contained in:
@@ -19,7 +19,9 @@ def fastapi_is_not_installed(_: argparse.Namespace) -> NoReturn:
|
||||
|
||||
def register_parser(parser: argparse.ArgumentParser) -> None:
|
||||
parser.add_argument("--port", type=int, default=2979, help="Port to listen on")
|
||||
parser.add_argument("--host", type=str, default="::1", help="Host to listen on")
|
||||
parser.add_argument(
|
||||
"--host", type=str, default="localhost", help="Host to listen on"
|
||||
)
|
||||
parser.add_argument(
|
||||
"--no-open", action="store_true", help="Don't open the browser", default=False
|
||||
)
|
||||
@@ -46,6 +48,14 @@ def register_parser(parser: argparse.ArgumentParser) -> None:
|
||||
choices=["critical", "error", "warning", "info", "debug", "trace"],
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"sub_url",
|
||||
type=str,
|
||||
default="/",
|
||||
nargs="?",
|
||||
help="Sub url to open in the browser",
|
||||
)
|
||||
|
||||
# Set the args.func variable in args
|
||||
if start_server is None:
|
||||
parser.set_defaults(func=fastapi_is_not_installed)
|
||||
|
||||
Reference in New Issue
Block a user