From 5f53d2d8fd29a745cf4cf1d6c8fa6b4032fdca0f Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Wed, 18 Aug 2021 08:48:45 +0000 Subject: [PATCH] Refactor useless `else` block in the loop --- Stella/database/blocklists_mongo.py | 4 ++-- Stella/helper/button_gen.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Stella/database/blocklists_mongo.py b/Stella/database/blocklists_mongo.py index ead4bda..453adea 100644 --- a/Stella/database/blocklists_mongo.py +++ b/Stella/database/blocklists_mongo.py @@ -149,8 +149,8 @@ def get_blocklist_reason(chat_id, blocklist_text): if bl_text == blocklist_text: blocklist_reason = bl_data['blocklist_reason'] return blocklist_reason - else: - return None + + return None else: return Nones diff --git a/Stella/helper/button_gen.py b/Stella/helper/button_gen.py index 978f01f..5de5357 100644 --- a/Stella/helper/button_gen.py +++ b/Stella/helper/button_gen.py @@ -67,7 +67,7 @@ def button_markdown_parser(text): else: text_data += markdown_note[prev:to_check] prev = match.start(1) - 1 - else: - text_data += markdown_note[prev:] + + text_data += markdown_note[prev:] return text_data, buttons