From 67ce83b145987e8d343513d108f1ecd91b11a47b Mon Sep 17 00:00:00 2001 From: eecavanna <134325062+eecavanna@users.noreply.github.com> Date: Thu, 21 Nov 2024 21:41:21 -0800 Subject: [PATCH] Fix issues identified by linter --- nmdc_server/cli.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nmdc_server/cli.py b/nmdc_server/cli.py index 56926e82..c45a095f 100644 --- a/nmdc_server/cli.py +++ b/nmdc_server/cli.py @@ -147,7 +147,7 @@ def require_setting(name: str): # Post a message to Slack if a Slack webhook URL is defined. # Reference: https://api.slack.com/messaging/webhooks#posting_with_webhooks if settings.slack_webhook_url_for_ingester not in [None, ""]: - click.echo(f"Posting message to Slack.") + click.echo("Posting message to Slack.") response = requests.post( settings.slack_webhook_url_for_ingester, json={"text": "Ingest is done."}, @@ -156,8 +156,8 @@ def require_setting(name: str): # Note: We currently consider the posting of a Slack message to be a "nice # to have" as opposed to a "must have." So, if it happens to fail, # we just echo an error message instead of `raise`-ing an exception. - if r.status_code != 200: - click.echo(f"Failed to post message to Slack.", err=True) + if response.status_code != 200: + click.echo("Failed to post message to Slack.", err=True) @cli.command()