diff --git a/AsunaRobot/modules/blacklist_stickers.py b/AsunaRobot/modules/blacklist_stickers.py
index 7e3648c8..ea32dde2 100644
--- a/AsunaRobot/modules/blacklist_stickers.py
+++ b/AsunaRobot/modules/blacklist_stickers.py
@@ -48,12 +48,9 @@ def blackliststicker(update: Update, context: CallbackContext):
split_text = split_message(sticker_list)
for text in split_text:
- if (
- sticker_list
- == "List blacklisted stickers currently in {}:\n".format(
- chat_name,
- ).format(html.escape(chat_name))
- ):
+ if sticker_list == "List blacklisted stickers currently in {}:\n".format(
+ chat_name,
+ ).format(html.escape(chat_name)):
send_message(
update.effective_message,
"There are no blacklist stickers in {}!".format(
diff --git a/AsunaRobot/modules/gettime.py b/AsunaRobot/modules/gettime.py
index af346887..44c7edc1 100644
--- a/AsunaRobot/modules/gettime.py
+++ b/AsunaRobot/modules/gettime.py
@@ -32,12 +32,9 @@ def generate_time(to_find: str, findtype: List[str]) -> str:
time_fmt = r"%H:%M:%S"
day_fmt = r"%A"
gmt_offset = zone["gmtOffset"]
- timestamp = (
- datetime.datetime.now(
- datetime.timezone.utc,
- )
- + datetime.timedelta(seconds=gmt_offset)
- )
+ timestamp = datetime.datetime.now(
+ datetime.timezone.utc,
+ ) + datetime.timedelta(seconds=gmt_offset)
current_date = timestamp.strftime(date_fmt)
current_time = timestamp.strftime(time_fmt)
current_day = timestamp.strftime(day_fmt)
diff --git a/AsunaRobot/modules/locks.py b/AsunaRobot/modules/locks.py
index e1037e42..7e37c9d8 100644
--- a/AsunaRobot/modules/locks.py
+++ b/AsunaRobot/modules/locks.py
@@ -372,7 +372,7 @@ def del_lockables(update, context):
if lockable == "rtl":
if sql.is_locked(chat.id, lockable) and can_delete(chat, context.bot.id):
if message.caption:
- check = ad.detect_alphabet(u"{}".format(message.caption))
+ check = ad.detect_alphabet("{}".format(message.caption))
if "ARABIC" in check:
try:
message.delete()
@@ -383,7 +383,7 @@ def del_lockables(update, context):
LOGGER.exception("ERROR in lockables")
break
if message.text:
- check = ad.detect_alphabet(u"{}".format(message.text))
+ check = ad.detect_alphabet("{}".format(message.text))
if "ARABIC" in check:
try:
message.delete()
diff --git a/AsunaRobot/modules/purge.py b/AsunaRobot/modules/purge.py
index 7d7b260b..99aeb516 100644
--- a/AsunaRobot/modules/purge.py
+++ b/AsunaRobot/modules/purge.py
@@ -13,13 +13,10 @@ async def purge_messages(event):
if event.from_id is None:
return
- if (
- not await user_is_admin(
- user_id=event.sender_id,
- message=event,
- )
- and event.from_id not in [1087968824]
- ):
+ if not await user_is_admin(
+ user_id=event.sender_id,
+ message=event,
+ ) and event.from_id not in [1087968824]:
await event.reply("Only Admins are allowed to use this command")
return
@@ -55,13 +52,10 @@ async def delete_messages(event):
if event.from_id is None:
return
- if (
- not await user_is_admin(
- user_id=event.sender_id,
- message=event,
- )
- and event.from_id not in [1087968824]
- ):
+ if not await user_is_admin(
+ user_id=event.sender_id,
+ message=event,
+ ) and event.from_id not in [1087968824]:
await event.reply("Only Admins are allowed to use this command")
return
diff --git a/AsunaRobot/services/telethonbasics.py b/AsunaRobot/services/telethonbasics.py
index bb9be27c..fb421370 100644
--- a/AsunaRobot/services/telethonbasics.py
+++ b/AsunaRobot/services/telethonbasics.py
@@ -159,7 +159,7 @@ def humanbytes(size):
if not size:
return ""
# 2 ** 10 = 1024
- power = 2 ** 10
+ power = 2**10
raised_to_pow = 0
dict_power_n = {0: "", 1: "Ki", 2: "Mi", 3: "Gi", 4: "Ti"}
while size > power:
diff --git a/AsunaRobot/utils/pluginhelper.py b/AsunaRobot/utils/pluginhelper.py
index c37d0e83..6b5df995 100644
--- a/AsunaRobot/utils/pluginhelper.py
+++ b/AsunaRobot/utils/pluginhelper.py
@@ -87,7 +87,7 @@ async def delete_or_pass(message):
def humanbytes(size):
if not size:
return ""
- power = 2 ** 10
+ power = 2**10
raised_to_pow = 0
dict_power_n = {0: "", 1: "Ki", 2: "Mi", 3: "Gi", 4: "Ti"}
while size > power:
diff --git a/AsunaRobot/utils/uputils.py b/AsunaRobot/utils/uputils.py
index ae23a1e9..2ba7bf08 100644
--- a/AsunaRobot/utils/uputils.py
+++ b/AsunaRobot/utils/uputils.py
@@ -25,7 +25,7 @@ async def progress(current, total, event, start, type_of_ps):
def convert_from_bytes(size):
- power = 2 ** 10
+ power = 2**10
n = 0
units = {0: "", 1: "kilobytes", 2: "megabytes", 3: "gigabytes", 4: "terabytes"}
while size > power:
@@ -41,7 +41,7 @@ def humanbytes(size):
if not size:
return ""
# 2 ** 10 = 1024
- power = 2 ** 10
+ power = 2**10
raised_to_pow = 0
dict_power_n = {0: "", 1: "Ki", 2: "Mi", 3: "Gi", 4: "Ti"}
while size > power: