update dependencies, formatter run

This commit is contained in:
Luna 2023-11-18 18:56:33 -03:00
parent 84e2b5f1a9
commit d853073114
7 changed files with 8 additions and 13 deletions

View File

@ -92,7 +92,6 @@ async def _resize(image, attach_id: int, ext: str, width: int, height: int) -> s
"/attachments" "/<int:channel_id>/<int:message_id>/<filename>", methods=["GET"] "/attachments" "/<int:channel_id>/<int:message_id>/<filename>", methods=["GET"]
) )
async def _get_attachment(channel_id: int, message_id: int, filename: str): async def _get_attachment(channel_id: int, message_id: int, filename: str):
attach_id = await app.db.fetchval( attach_id = await app.db.fetchval(
""" """
SELECT id SELECT id

View File

@ -157,7 +157,6 @@ def emoji_sql(
where_ext = f"AND emoji_id = {param}" where_ext = f"AND emoji_id = {param}"
main_emoji = emoji_id main_emoji = emoji_id
elif emoji_type == EmojiType.UNICODE: elif emoji_type == EmojiType.UNICODE:
# fun fact, emojis are length 1 in python? i'll use this to the # fun fact, emojis are length 1 in python? i'll use this to the
# best of my ability, lol # best of my ability, lol
if len(emoji_name) != 1: if len(emoji_name) != 1:

View File

@ -363,7 +363,6 @@ async def _process_overwrites(guild_id: int, channel_id: int, overwrites: list)
user_ids: List[int] = [] user_ids: List[int] = []
for overwrite in overwrites: for overwrite in overwrites:
# 0 for member overwrite, 1 for role overwrite # 0 for member overwrite, 1 for role overwrite
target_type = 0 if overwrite["type"] == "member" else 1 target_type = 0 if overwrite["type"] == "member" else 1
target_role = None if target_type == 0 else overwrite["id"] target_role = None if target_type == 0 else overwrite["id"]

View File

@ -150,7 +150,6 @@ async def _specific_chan_create(channel_id, ctype, **kwargs):
async def _subscribe_users_new_channel(guild_id: int, channel_id: int) -> None: async def _subscribe_users_new_channel(guild_id: int, channel_id: int) -> None:
# for each state currently subscribed to guild, we check on the database # for each state currently subscribed to guild, we check on the database
# which states can also subscribe to the new channel at its creation. # which states can also subscribe to the new channel at its creation.

View File

@ -552,7 +552,6 @@ class GuildMemberList:
# NOTE: maybe use map()? # NOTE: maybe use map()?
for group, member_ids in self.list: for group, member_ids in self.list:
# do not send information on groups # do not send information on groups
# that don't have anyone # that don't have anyone
if not member_ids: if not member_ids:

View File

@ -225,7 +225,7 @@ async def maybe_lazy_guild_dispatch(
if isinstance(role, dict) and not role["hoist"] and not force: if isinstance(role, dict) and not role["hoist"] and not force:
return return
await (getattr(app.lazy_guild, event))(guild_id, role) await getattr(app.lazy_guild, event)(guild_id, role)
def extract_limit(request_, default: int = 50, max_val: int = 100): def extract_limit(request_, default: int = 50, max_val: int = 100):

14
tox.ini
View File

@ -5,13 +5,13 @@ isolated_build = true
[testenv] [testenv]
ignore_errors = true ignore_errors = true
deps = deps =
pytest==7.1.2 pytest==7.4.3
pytest-asyncio==0.19.0 pytest-asyncio==0.21.1
pytest-cov==3.0.0 pytest-cov==4.1.0
flake8==5.0.4 flake8==6.1.0
black==22.6.0 black==23.11.0
mypy==0.971 mypy==1.7.0
pytest-instafail==0.4.2 pytest-instafail==0.5.0
commands = commands =
python3 ./manage.py migrate python3 ./manage.py migrate
black --check litecord run.py tests manage black --check litecord run.py tests manage