Compare commits

..

No commits in common. "e3ca982efd2537c8df174eb497b58f5a7fad5b42" and "bb8621ba7259ba6232542ea99474224a04cb486c" have entirely different histories.

4 changed files with 152 additions and 922 deletions

View File

@ -432,8 +432,7 @@ class Storage:
return {**row, **drow} return {**row, **drow}
elif chan_type == ChannelType.GUILD_VOICE: elif chan_type == ChannelType.GUILD_VOICE:
voice_channel_data = dict( voice_channel_data = await self.db.fetchrow(
await self.db.fetchrow(
""" """
SELECT bitrate, user_limit SELECT bitrate, user_limit
FROM guild_voice_channels FROM guild_voice_channels
@ -441,13 +440,12 @@ class Storage:
""", """,
row["id"], row["id"],
) )
)
guild_region = await self.db.fetchval( guild_region = await self.db.fetchval(
""" """
SELECT region SELECT region
FROM guilds FROM guilds
WHERE guilds.id = $1 WHERE guild.id = $1
""", """,
int(row["guild_id"]), int(row["guild_id"]),
) )
@ -455,7 +453,7 @@ class Storage:
# see https://gitlab.com/litecord/litecord/-/issues/130 # see https://gitlab.com/litecord/litecord/-/issues/130
voice_channel_data["rtc_region"] = guild_region voice_channel_data["rtc_region"] = guild_region
return {**row, **voice_channel_data} return {**row, **dict(voice_channel_data)}
else: else:
# this only exists to trick mypy. this codepath is unreachable # this only exists to trick mypy. this codepath is unreachable
raise AssertionError("Unreachable code path.") raise AssertionError("Unreachable code path.")

1044
poetry.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -7,19 +7,19 @@ license = "GPLv3-only"
[tool.poetry.dependencies] [tool.poetry.dependencies]
python = "^3.9" python = "^3.9"
bcrypt = "^4.0.1" bcrypt = "^3.2.2"
itsdangerous = "^2.1.2" itsdangerous = "^2.1.2"
asyncpg = "^0.27.0" asyncpg = "^0.26.0"
websockets = "^11.0.3" websockets = "^10.3"
Earl-ETF = "^2.1.2" Earl-ETF = "^2.1.2"
logbook = "^1.5.3" logbook = "^1.5.3"
Cerberus = "^1.3.4" Cerberus = "^1.3.4"
quart = "^0.18.4" quart = "^0.18.0"
pillow = "^9.5.0" pillow = "^9.2.0"
aiohttp = "^3.8.4" aiohttp = "^3.8.1"
zstandard = "^0.21.0" zstandard = "^0.18.0"
winter = {git = "https://gitlab.com/elixire/winter"} winter = {git = "https://gitlab.com/elixire/winter"}
wsproto = "^1.2.0" wsproto = "^1.1.0"

View File

@ -1,5 +1,5 @@
[tox] [tox]
envlist = py3 envlist = py3.10
isolated_build = true isolated_build = true
[testenv] [testenv]