run ruff check --fix

This commit is contained in:
2024-10-05 12:27:14 -04:00
parent 00212ea09d
commit 7919a63e04
14 changed files with 29 additions and 66 deletions
+3 -9
View File
@@ -2,7 +2,6 @@
Set command heirarchy.
"""
from typing import Optional
import nextcord
from nextcord.ext import commands
@@ -37,7 +36,7 @@ class SetCog(commands.Cog, name="Set command."):
group_id: str = nextcord.SlashOption(
name="group", description="Category Group to assign to channel.", required=True
),
channel: Optional[nextcord.abc.GuildChannel] = nextcord.SlashOption(
channel: nextcord.abc.GuildChannel | None = nextcord.SlashOption(
description="Channel to register",
required=False,
channel_types=[nextcord.ChannelType.text],
@@ -53,7 +52,6 @@ class SetCog(commands.Cog, name="Set command."):
channel (nextcord.abc.GuildChannel, optional): Channel to register
Is a SlashOption. Limited to text channels, Defaults to None.
"""
if not channel:
channel = interaction.channel
channel_id = channel.id
@@ -93,7 +91,6 @@ class SetCog(commands.Cog, name="Set command."):
group_id (str): String representation of Group id to set pad length in. Is SlashOption.
length (int): Number of characters. Is SlashOption. Defaults to 26.
"""
with Session(engine) as session:
stmt = (
select(CategoryGroup)
@@ -111,7 +108,7 @@ class SetCog(commands.Cog, name="Set command."):
async def submission_channel(
self,
interaction: nextcord.Interaction,
channel: Optional[nextcord.abc.GuildChannel] = nextcord.SlashOption(
channel: nextcord.abc.GuildChannel | None = nextcord.SlashOption(
description="Channel to register",
required=False,
channel_types=[nextcord.ChannelType.text],
@@ -126,7 +123,6 @@ class SetCog(commands.Cog, name="Set command."):
channel Optional[nextcord.abc.GuildChannel], optional): Channel to register
Is a SlashOption. Limited to text channels, Defaults to None.
"""
if not channel:
channel = interaction.channel
@@ -156,7 +152,6 @@ class SetCog(commands.Cog, name="Set command."):
interaction (nextcord.Interaction): Interaction that invoked the command
length (int): Number of characters. Is SlashOption. Defaults to 12.
"""
with Session(engine) as session:
stmt = (
select(CategoryGroup)
@@ -172,7 +167,7 @@ class SetCog(commands.Cog, name="Set command."):
async def verify_channel(
self,
interaction: nextcord.Interaction,
channel: Optional[nextcord.abc.GuildChannel] = nextcord.SlashOption(
channel: nextcord.abc.GuildChannel | None = nextcord.SlashOption(
description="Channel to register",
required=False,
channel_types=[nextcord.ChannelType.text],
@@ -187,7 +182,6 @@ class SetCog(commands.Cog, name="Set command."):
channel (Optional[nextcord.abc.GuildChannel]): Channel to register
Is a SlashOption. Limited to text channels, Defaults to None.
"""
if not channel:
channel = interaction.channel
channel_id = channel.id