mirror of
https://github.com/zulip/zulip.git
synced 2025-10-22 20:42:14 +00:00
python: Elide type=str from argparse arguments.
This commit is contained in:
committed by
Tim Abbott
parent
ca01de84be
commit
1e943ae7df
@@ -246,7 +246,6 @@ group = parser.add_mutually_exclusive_group(required=True)
|
||||
group.add_argument(
|
||||
"--thread",
|
||||
nargs="+",
|
||||
type=str,
|
||||
help="Path of the file where the thread for screenshot is present",
|
||||
)
|
||||
fixture_group = parser.add_argument_group("thread")
|
||||
|
@@ -17,12 +17,10 @@ class Command(ZulipBaseCommand):
|
||||
group = parser.add_mutually_exclusive_group(required=True)
|
||||
group.add_argument(
|
||||
"--enable",
|
||||
type=str,
|
||||
help="Name of the authentication backend to enable",
|
||||
)
|
||||
group.add_argument(
|
||||
"--disable",
|
||||
type=str,
|
||||
help="Name of the authentication backend to disable",
|
||||
)
|
||||
group.add_argument(
|
||||
|
@@ -20,13 +20,11 @@ class Command(BaseCommand):
|
||||
parser.add_argument(
|
||||
"--user",
|
||||
help="User to drop privileges to, if started as root.",
|
||||
type=str,
|
||||
required=(os.geteuid() == 0),
|
||||
)
|
||||
parser.add_argument(
|
||||
"--group",
|
||||
help="Group to drop privileges to, if started as root.",
|
||||
type=str,
|
||||
required=(os.geteuid() == 0),
|
||||
)
|
||||
tls_cert: str | None = None
|
||||
@@ -44,13 +42,11 @@ class Command(BaseCommand):
|
||||
parser.add_argument(
|
||||
"--tls-cert",
|
||||
help="Path to TLS certificate chain file",
|
||||
type=str,
|
||||
default=tls_cert,
|
||||
)
|
||||
parser.add_argument(
|
||||
"--tls-key",
|
||||
help="Path to TLS private key file",
|
||||
type=str,
|
||||
default=tls_key,
|
||||
)
|
||||
|
||||
|
@@ -14,9 +14,7 @@ class Command(BaseCommand):
|
||||
|
||||
@override
|
||||
def add_arguments(self, parser: CommandParser) -> None:
|
||||
parser.add_argument(
|
||||
"listen", help="[Port, or address:port, to bind HTTP server to]", type=str
|
||||
)
|
||||
parser.add_argument("listen", help="[Port, or address:port, to bind HTTP server to]")
|
||||
local_port = 80
|
||||
config_file = get_config_file()
|
||||
if get_config(config_file, "application_server", "http_only", False):
|
||||
|
@@ -29,7 +29,6 @@ Usage:
|
||||
)
|
||||
parser.add_argument(
|
||||
"--remove-key",
|
||||
type=str,
|
||||
metavar="PUBLIC_KEY",
|
||||
help="Remove the key pair associated with the given public key from the `push_registration_encryption_keys` map.",
|
||||
)
|
||||
|
Reference in New Issue
Block a user