From 76f3ab2289e4a2f9c3aa1134315516f911d95b80 Mon Sep 17 00:00:00 2001 From: Daniel Thorn Date: Fri, 1 Nov 2024 10:14:49 -0700 Subject: [PATCH] Fix gcs-cli and pubsub-cli script definitions (#26) --- obs_common/gcs_cli.py | 5 ----- obs_common/pubsub_cli.py | 5 ----- pyproject.toml | 4 ++-- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/obs_common/gcs_cli.py b/obs_common/gcs_cli.py index 0d1b537..9bfd952 100755 --- a/obs_common/gcs_cli.py +++ b/obs_common/gcs_cli.py @@ -161,10 +161,5 @@ def upload(source, destination): click.echo(f"Uploaded gs://{bucket_name}/{key}") -def main(argv=None): - argv = argv or [] - gcs_group(argv) - - if __name__ == "__main__": gcs_group() diff --git a/obs_common/pubsub_cli.py b/obs_common/pubsub_cli.py index 35f1721..78498a3 100755 --- a/obs_common/pubsub_cli.py +++ b/obs_common/pubsub_cli.py @@ -168,10 +168,5 @@ def pull(ctx, project_id, subscription_name, ack, max_messages): subscriber.acknowledge(subscription=subscription_path, ack_ids=ack_ids) -def main(argv=None): - argv = argv or [] - pubsub_group(argv) - - if __name__ == "__main__": pubsub_group() diff --git a/pyproject.toml b/pyproject.toml index ecc890b..1d2869a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,8 +20,8 @@ dynamic = ["version"] [project.scripts] license-check = "obs_common.license_check:main" service-status = "obs_common.service_status:main" -gcs-cli = "obs_common.gcs_cli:main" -pubsub-cli = "obs_common.pubsub_cli:main" +gcs-cli = "obs_common.gcs_cli:gcs_group" +pubsub-cli = "obs_common.pubsub_cli:pubsub_group" sentry-wrap = "obs_common.sentry_wrap:cli_main" [build-system]