diff --git a/puppet/zulip/files/nagios_plugins/zulip_app_frontend/check_send_receive_time b/puppet/zulip/files/nagios_plugins/zulip_app_frontend/check_send_receive_time index 6cdb6a4455..10037f95c7 100755 --- a/puppet/zulip/files/nagios_plugins/zulip_app_frontend/check_send_receive_time +++ b/puppet/zulip/files/nagios_plugins/zulip_app_frontend/check_send_receive_time @@ -33,8 +33,7 @@ usage = """Usage: send-receive.py [options] [config] parser = argparse.ArgumentParser(usage=usage) parser.add_argument('--site', - default="https://api.zulip.com", - action='store') + default="https://api.zulip.com") parser.add_argument('--nagios', action='store_true') diff --git a/scripts/lib/queue_workers.py b/scripts/lib/queue_workers.py index fe90f2f7cd..71391d7ce6 100755 --- a/scripts/lib/queue_workers.py +++ b/scripts/lib/queue_workers.py @@ -18,7 +18,7 @@ from zerver.worker.queue_processors import get_active_worker_queues if __name__ == "__main__": parser = argparse.ArgumentParser() - parser.add_argument('--queue-type', action='store', + parser.add_argument('--queue-type', help="Specify which types of queues to list") args = parser.parse_args() diff --git a/scripts/nagios/check-rabbitmq-consumers b/scripts/nagios/check-rabbitmq-consumers index 8cf11a9f2f..e8f1ca6431 100755 --- a/scripts/nagios/check-rabbitmq-consumers +++ b/scripts/nagios/check-rabbitmq-consumers @@ -29,8 +29,7 @@ parser = argparse.ArgumentParser(usage=usage) parser.add_argument('--min-threshold', dest='min_count', type=int, - default=1, - action='store') + default=1) options = parser.parse_args() diff --git a/scripts/zulip-puppet-apply b/scripts/zulip-puppet-apply index 289feaf5ee..d5cf797ecd 100755 --- a/scripts/zulip-puppet-apply +++ b/scripts/zulip-puppet-apply @@ -16,7 +16,7 @@ parser.add_argument('--force', '-f', action="store_true", help="Do not prompt with proposed changes") parser.add_argument('--noop', action="store_true", help="Do not apply the changes") -parser.add_argument('--config', action="store", +parser.add_argument('--config', default="/etc/zulip/zulip.conf", help="Alternate zulip.conf path") args, extra_args = parser.parse_known_args() diff --git a/tools/run-dev.py b/tools/run-dev.py index 8c4101bb0d..6a7007f865 100755 --- a/tools/run-dev.py +++ b/tools/run-dev.py @@ -48,7 +48,6 @@ parser.add_argument('--minify', action='store_true', help='Minifies assets for testing in dev') parser.add_argument('--interface', - action='store', help='Set the IP or hostname for the proxy to listen on') parser.add_argument('--no-clear-memcached', action='store_false', dest='clear_memcached', diff --git a/tools/test-backend b/tools/test-backend index 3c3b294ae9..50f414ab80 100755 --- a/tools/test-backend +++ b/tools/test-backend @@ -223,7 +223,6 @@ def main() -> None: parser.add_argument('--parallel', dest='processes', type=int, - action='store', default=default_parallel, help='Specify the number of processes to run the ' 'tests in. Default is the number of logical CPUs') diff --git a/tools/webpack b/tools/webpack index 4d743f24fb..26d21c19de 100755 --- a/tools/webpack +++ b/tools/webpack @@ -121,10 +121,8 @@ parser.add_argument('--watch', action='store_true', help='watch for changes to source files (for development)') parser.add_argument('--host', - action='store', default='127.0.0.1', help='set the host for the webpack server to run on') parser.add_argument('--port', - action='store', default='9994', help='set the port for the webpack server to run on') parser.add_argument('--minify', action='store_true', diff --git a/tools/zulip-export/zulip-export b/tools/zulip-export/zulip-export index b07c47fadf..f6230144ac 100755 --- a/tools/zulip-export/zulip-export +++ b/tools/zulip-export/zulip-export @@ -38,7 +38,7 @@ sys.path.append(os.path.join(os.path.dirname(__file__), '../../api')) import zulip parser = zulip.add_default_arguments(argparse.ArgumentParser(usage=usage)) -parser.add_argument('--stream', default='', action="store") +parser.add_argument('--stream', default='') options = parser.parse_args() client = zulip.init_from_options(options) diff --git a/zerver/management/commands/convert_gitter_data.py b/zerver/management/commands/convert_gitter_data.py index 16239b716b..cc5da9fc40 100644 --- a/zerver/management/commands/convert_gitter_data.py +++ b/zerver/management/commands/convert_gitter_data.py @@ -18,11 +18,9 @@ class Command(BaseCommand): help="Gitter data in json format") parser.add_argument('--output', dest='output_dir', - action="store", help='Directory to write exported data to.') parser.add_argument('--threads', - action="store", default=settings.DEFAULT_DATA_EXPORT_IMPORT_PARALLELISM, help='Threads to download avatars and attachments faster') diff --git a/zerver/management/commands/convert_hipchat_data.py b/zerver/management/commands/convert_hipchat_data.py index 8b72314cc9..615f1f6626 100644 --- a/zerver/management/commands/convert_hipchat_data.py +++ b/zerver/management/commands/convert_hipchat_data.py @@ -35,7 +35,6 @@ class Command(BaseCommand): help="tar of Hipchat data") parser.add_argument('--output', dest='output_dir', - action="store", help='Directory to write exported data to.') parser.add_argument('--mask', dest='masking_content', @@ -48,7 +47,6 @@ class Command(BaseCommand): " See import docs for details.") parser.add_argument('--token', dest='api_token', - action="store", help='API token for the HipChat API for fetching subscribers.') parser.formatter_class = argparse.RawTextHelpFormatter diff --git a/zerver/management/commands/convert_mattermost_data.py b/zerver/management/commands/convert_mattermost_data.py index 292a8b9c3d..887c3bef02 100644 --- a/zerver/management/commands/convert_mattermost_data.py +++ b/zerver/management/commands/convert_mattermost_data.py @@ -29,7 +29,6 @@ class Command(BaseCommand): help=dir_help) parser.add_argument('--output', dest='output_dir', - action="store", help='Directory to write converted data to.') parser.add_argument('--mask', dest='masking_content', diff --git a/zerver/management/commands/convert_slack_data.py b/zerver/management/commands/convert_slack_data.py index 79b4f01633..443b6b18a3 100644 --- a/zerver/management/commands/convert_slack_data.py +++ b/zerver/management/commands/convert_slack_data.py @@ -21,11 +21,9 @@ class Command(BaseCommand): type=str, help='Slack legacy token of the organsation') parser.add_argument('--output', dest='output_dir', - action="store", help='Directory to write exported data to.') parser.add_argument('--threads', - action="store", default=settings.DEFAULT_DATA_EXPORT_IMPORT_PARALLELISM, help='Threads to use in exporting UserMessage objects in parallel') diff --git a/zerver/management/commands/export.py b/zerver/management/commands/export.py index 15231d1457..43bfb94c77 100644 --- a/zerver/management/commands/export.py +++ b/zerver/management/commands/export.py @@ -79,10 +79,8 @@ class Command(ZulipBaseCommand): def add_arguments(self, parser: ArgumentParser) -> None: parser.add_argument('--output', dest='output_dir', - action="store", help='Directory to write exported data to.') parser.add_argument('--threads', - action="store", default=settings.DEFAULT_DATA_EXPORT_IMPORT_PARALLELISM, help='Threads to use in exporting UserMessage objects in parallel') parser.add_argument('--public-only', @@ -92,7 +90,6 @@ class Command(ZulipBaseCommand): action="store_true", help='Deactivate the realm immediately before exporting') parser.add_argument('--consent-message-id', - action="store", type=int, help='ID of the message advertising users to react with thumbs up') parser.add_argument('--upload', diff --git a/zerver/management/commands/export_single_user.py b/zerver/management/commands/export_single_user.py index f786db52ae..97770730f1 100644 --- a/zerver/management/commands/export_single_user.py +++ b/zerver/management/commands/export_single_user.py @@ -23,7 +23,6 @@ class Command(ZulipBaseCommand): help="email of user to export") parser.add_argument('--output', dest='output_dir', - action="store", help='Directory to write exported data to.') self.add_realm_args(parser) diff --git a/zerver/management/commands/export_usermessage_batch.py b/zerver/management/commands/export_usermessage_batch.py index 900897c436..9a9683e82b 100644 --- a/zerver/management/commands/export_usermessage_batch.py +++ b/zerver/management/commands/export_usermessage_batch.py @@ -15,13 +15,10 @@ class Command(BaseCommand): def add_arguments(self, parser: ArgumentParser) -> None: parser.add_argument('--path', - action="store", help='Path to find messages.json archives') parser.add_argument('--thread', - action="store", help='Thread ID') parser.add_argument('--consent-message-id', - action="store", type=int, help='ID of the message advertising users to react with thumbs up') diff --git a/zerver/management/commands/get_migration_status.py b/zerver/management/commands/get_migration_status.py index d47a2f6601..b92c90f9dc 100644 --- a/zerver/management/commands/get_migration_status.py +++ b/zerver/management/commands/get_migration_status.py @@ -16,11 +16,11 @@ class Command(BaseCommand): parser.add_argument('app_label', nargs='?', help='App label of an application to synchronize the state.') - parser.add_argument('--database', action='store', + parser.add_argument('--database', default=DEFAULT_DB_ALIAS, help='Nominates a database to synchronize. ' 'Defaults to the "default" database.') - parser.add_argument('--output', action='store', + parser.add_argument('--output', help='Path to store the status to (default to stdout).') def handle(self, *args: Any, **options: Any) -> None: diff --git a/zerver/management/commands/import.py b/zerver/management/commands/import.py index 1ede79de29..94e8c03f10 100644 --- a/zerver/management/commands/import.py +++ b/zerver/management/commands/import.py @@ -33,7 +33,6 @@ import a database dump from one or more JSON files.""" metavar='', help="list of export directories to import") parser.add_argument('--processes', - action="store", default=settings.DEFAULT_DATA_EXPORT_IMPORT_PARALLELISM, help='Number of processes to use for uploading Avatars to S3 in parallel') parser.formatter_class = argparse.RawTextHelpFormatter diff --git a/zerver/management/commands/knight.py b/zerver/management/commands/knight.py index 3dac43e0ac..b162601f12 100644 --- a/zerver/management/commands/knight.py +++ b/zerver/management/commands/knight.py @@ -24,7 +24,6 @@ ONLY perform this on customer request from an authorized person. action="store_false", help='Remove an administrator\'s rights.') parser.add_argument('--permission', - action="store", default='administer', choices=['administer', 'api_super_user'], help='Permission to grant/remove.') diff --git a/zerver/management/commands/transfer_uploads_to_s3.py b/zerver/management/commands/transfer_uploads_to_s3.py index f37836538f..a1f4b650c5 100644 --- a/zerver/management/commands/transfer_uploads_to_s3.py +++ b/zerver/management/commands/transfer_uploads_to_s3.py @@ -11,7 +11,6 @@ class Command(BaseCommand): def add_arguments(self, parser: CommandParser) -> None: parser.add_argument('--processes', - action="store", default=settings.DEFAULT_DATA_EXPORT_IMPORT_PARALLELISM, help='Processes to use for exporting uploads in parallel')