Changed line length to 108 in black

This commit is contained in:
2025-04-27 22:06:35 +02:00
parent 923173ebe8
commit 11f0cc384a
14 changed files with 101 additions and 44 deletions

View File

@@ -97,7 +97,9 @@ class PycordEvent:
return cls(**db_entry)
@classmethod
async def from_name(cls, event_name: str, guild_id: int, cache: Optional[Cache] = None) -> "PycordEvent":
async def from_name(
cls, event_name: str, guild_id: int, cache: Optional[Cache] = None
) -> "PycordEvent":
"""Find the event by its name and construct PycordEvent from database entry.
If multiple events with the same name exist, the one with the greatest start date will be returned.
@@ -244,7 +246,9 @@ class PycordEvent:
stage_index: int = self.stage_ids.index(event_stage_id)
old_stage_index: int = old_stage_ids.index(event_stage_id)
logger.debug("Indexes for %s: was %s and is now %s", event_stage_id, old_stage_index, stage_index)
logger.debug(
"Indexes for %s: was %s and is now %s", event_stage_id, old_stage_index, stage_index
)
if stage_index != old_stage_index:
await (await bot.find_event_stage(event_stage_id)).update(cache, sequence=stage_index)
@@ -407,7 +411,9 @@ class PycordEvent:
await self._set(cache, stage_ids=self.stage_ids)
await self._update_event_stage_order(bot, old_stage_ids, cache=cache)
async def remove_stage(self, bot: "PycordBot", event_stage_id: ObjectId, cache: Optional[Cache] = None) -> None:
async def remove_stage(
self, bot: "PycordBot", event_stage_id: ObjectId, cache: Optional[Cache] = None
) -> None:
"""Remove a stage from the event.
Args: