python: Elide type=str from argparse arguments.

This commit is contained in:
Alex Vandiver
2025-10-17 18:25:09 +00:00
committed by Tim Abbott
parent ca01de84be
commit 1e943ae7df
5 changed files with 1 additions and 11 deletions

View File

@@ -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")

View File

@@ -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(

View File

@@ -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,
)

View File

@@ -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):

View File

@@ -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.",
)