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"]
)
async def _get_attachment(channel_id: int, message_id: int, filename: str):
attach_id = await app.db.fetchval(
"""
SELECT id

View File

@ -157,7 +157,6 @@ def emoji_sql(
where_ext = f"AND emoji_id = {param}"
main_emoji = emoji_id
elif emoji_type == EmojiType.UNICODE:
# fun fact, emojis are length 1 in python? i'll use this to the
# best of my ability, lol
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] = []
for overwrite in overwrites:
# 0 for member overwrite, 1 for role overwrite
target_type = 0 if overwrite["type"] == "member" else 1
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:
# for each state currently subscribed to guild, we check on the database
# which states can also subscribe to the new channel at its creation.

View File

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

14
tox.ini
View File

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