Finish fixing lint smells in loops directory.

This commit is contained in:
2025-03-03 23:36:07 -05:00
parent 9cf05f44d0
commit f43dccb12d
2 changed files with 9 additions and 9 deletions
+3 -2
View File
@@ -3,6 +3,7 @@
from nextcord.ext import commands, tasks
from sqlalchemy import select
from sqlalchemy.orm import Session
from sqlmodel import col
from database.db import engine
from database.models import Guild
@@ -11,7 +12,7 @@ from database.models import Guild
class GuildData(commands.Cog, name="Guild Data"):
"""Class to contain loop."""
def __init__(self, bot: commands.bot) -> None:
def __init__(self, bot: commands.Bot) -> None:
self.bot = bot
@commands.Cog.listener()
@@ -30,7 +31,7 @@ class GuildData(commands.Cog, name="Guild Data"):
with Session(engine) as session:
for guild in self.bot.guilds:
# update given guild name for guild id
stmt = select(Guild).where(Guild.id == guild.id)
stmt = select(Guild).where(col(Guild.id == guild.id))
guild_data = session.scalar(stmt)
# just in case checking if the guild doesn't exist.