Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Format code. #85

Merged
merged 1 commit into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion zeldris/modules/backups.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ def import_data(
# TODO: some of that link logic
# NOTE: consider default permissions stuff?
if conn:

text = f"Backup fully restored on *{chat_name}*."
else:
text = "Backup fully restored"
Expand Down
1 change: 0 additions & 1 deletion zeldris/modules/cleanblue.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ def clean_blue_text_must_click(update: Update, context: CallbackContext):
if len(fst_word) > 1 and any(
fst_word.startswith(start) for start in CMD_STARTERS
):

command = fst_word[1:].split("@")
chat = update.effective_chat

Expand Down
1 change: 0 additions & 1 deletion zeldris/modules/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,6 @@ def connected(bot, update, chat, user_id, need_admin=True):
user = update.effective_user

if chat.type == chat.PRIVATE and sql.get_connected_chat(user_id):

conn_id = sql.get_connected_chat(user_id).chat_id
getstatusadmin = bot.get_chat_member(
conn_id, update.effective_message.from_user.id
Expand Down
2 changes: 0 additions & 2 deletions zeldris/modules/dbcleanup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ def get_invalid_chats(bot: Bot, update: Update, remove: bool = False):
progress_message = None

for chat in chats:

if ((100 * chats.index(chat)) / len(chats)) > progress:
progress_bar = f"{progress}% completed in getting invalid chats."
if progress_message:
Expand Down Expand Up @@ -119,7 +118,6 @@ def get_muted_chats(bot: Bot, update: Update, leave: bool = False):
progress_message = None

for chat in chats:

if ((100 * chats.index(chat)) / len(chats)) > progress:
progress_bar = f"{progress}% completed in getting muted chats."
if progress_message:
Expand Down
3 changes: 0 additions & 3 deletions zeldris/modules/disable.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@

# If module is due to be loaded, then setup all the magical handlers
if is_module_loaded(FILENAME):

from zeldris.modules.helper_funcs.chat_status import (
connection_status,
is_user_admin,
Expand Down Expand Up @@ -103,7 +102,6 @@ def check_update(self, update): # sourcery skip: low-code-quality

class DisableAbleMessageHandler(MessageHandler):
def __init__(self, filters, callback, friendly, **kwargs):

super().__init__(filters, callback, **kwargs)
DISABLE_OTHER.append(friendly)
self.friendly = friendly
Expand All @@ -113,7 +111,6 @@ def __init__(self, filters, callback, friendly, **kwargs):
self.filters = Filters.update.messages

def check_update(self, update):

chat = update.effective_chat
message = update.effective_message
filter_result = self.filters(update)
Expand Down
1 change: 0 additions & 1 deletion zeldris/modules/notes.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,6 @@ def rmbutton(update: Update, _: CallbackContext):
return query.message.edit_text("Cancelled deletion of notes.")

if match == "true" and usermem == "creator":

allnotes = sql.get_all_chat_notes(chat.id)
count = 0
notelist = []
Expand Down
1 change: 0 additions & 1 deletion zeldris/modules/reporting.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ def report(
return ""

if chat.username and chat.type == Chat.SUPERGROUP:

reported = f"Reported {mention_html(reported_user.id, reported_user.first_name)} to the admins!"

msg = (
Expand Down
1 change: 0 additions & 1 deletion zeldris/modules/sql/cleanblue_sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ def chat_ignore_command(chat_id, ignore):
ignored = SESSION.query(CleanerBlueTextChat).get((str(chat_id), ignore))

if not ignored:

if str(chat_id) not in CLEANER_CHATS:
CLEANER_CHATS.setdefault(
str(chat_id),
Expand Down
4 changes: 0 additions & 4 deletions zeldris/modules/welcome.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@ def new_member(
new_members = update.effective_message.new_chat_members

for new_mem in new_members:

welcome_log = None
should_mute = True
welcome_bool = True
Expand All @@ -211,7 +210,6 @@ def new_member(
reply = False

if should_welc:

# Give the owner a special welcome
if new_mem.id == OWNER_ID:
update.effective_message.reply_text(
Expand Down Expand Up @@ -586,10 +584,8 @@ def left_member(
reply = False

if should_goodbye:

left_mem = update.effective_message.left_chat_member
if left_mem:

# Thingy for spamwatched users
if spamwtc is not None:
sw_ban = spamwtc.get_ban(left_mem.id)
Expand Down