From a086f4dac56028452bb8640f64a3569a334a699e Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 6 Apr 2021 20:22:12 +0000 Subject: [PATCH] Simplify the `if` statement --- mareabot/social/telegram_api.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/mareabot/social/telegram_api.py b/mareabot/social/telegram_api.py index d90a302..7ab8dba 100644 --- a/mareabot/social/telegram_api.py +++ b/mareabot/social/telegram_api.py @@ -32,7 +32,4 @@ def telegram_channel_delete_message(message_id: int, chat: str = CHANNEL) -> boo message = {"chat_id": chat, "message_id": message_id} r = requests.get(url=url, json=message) logger.info(r.json()) - if r.json()["ok"]: - return True - else: - return False + return bool(r.json()["ok"])