Skip to content

Commit 95c3a40

Browse files
Ruff format
1 parent 8d31037 commit 95c3a40

4 files changed

Lines changed: 18 additions & 6 deletions

File tree

‎cogs/induct.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,9 @@ async def _perform_induction(
252252
applicant_role, reason=INDUCT_AUDIT_MESSAGE
253253
)
254254

255-
tex_emoji: discord.GuildEmoji | discord.AppEmoji | None = self.bot.get_emoji(743218410409820213)
255+
tex_emoji: discord.GuildEmoji | discord.AppEmoji | None = self.bot.get_emoji(
256+
743218410409820213
257+
)
256258
if not tex_emoji:
257259
tex_emoji = discord.utils.get(main_guild.emojis, name="TeX")
258260

‎cogs/make_applicant.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@ async def _perform_make_applicant(
7676
await applicant_member.add_roles(applicant_role, reason=AUDIT_MESSAGE)
7777
logger.debug("Applicant role given to user %s", applicant_member)
7878

79-
tex_emoji: discord.GuildEmoji | discord.AppEmoji | None = self.bot.get_emoji(743218410409820213)
79+
tex_emoji: discord.GuildEmoji | discord.AppEmoji | None = self.bot.get_emoji(
80+
743218410409820213
81+
)
8082
if not tex_emoji:
8183
tex_emoji = discord.utils.get(main_guild.emojis, name="TeX")
8284

‎cogs/remind_me.py‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,8 +311,7 @@ async def clear_reminders_backlog(self) -> None:
311311
)
312312
if time_since_reminder_needed_to_be_sent > datetime.timedelta(minutes=15):
313313
user: discord.User | None = await self.bot.get_or_fetch(
314-
object_type=discord.User,
315-
object_id=int(reminder.discord_member.discord_id)
314+
object_type=discord.User, object_id=int(reminder.discord_member.discord_id)
316315
)
317316

318317
if not user:

‎cogs/strike.py‎

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,9 @@ async def _confirm_manual_add_strike( # noqa: PLR0915
510510
async for _audit_log_entry in main_guild.audit_logs(
511511
after=discord.utils.utcnow() - datetime.timedelta(minutes=1), action=action
512512
)
513-
if _audit_log_entry.target and _audit_log_entry.target.id == strike_user.id # NOTE: IDs are checked here rather than the objects themselves as the audit log provides an unusual object type in some cases.
513+
if _audit_log_entry.target
514+
and _audit_log_entry.target.id
515+
== strike_user.id # NOTE: IDs are checked here rather than the objects themselves as the audit log provides an unusual object type in some cases.
514516
)
515517
except (StopIteration, StopAsyncIteration):
516518
logger.debug("Printing 5 most recent audit logs:")
@@ -755,7 +757,14 @@ async def on_member_update(self, before: discord.Member, after: discord.Member)
755757

756758
audit_log_entry: discord.AuditLogEntry
757759
async for audit_log_entry in main_guild.audit_logs(limit=5):
758-
FOUND_CORRECT_AUDIT_LOG_ENTRY: bool = ((audit_log_entry.target is not None) and (audit_log_entry.target.id == after.id) and (audit_log_entry.action == discord.AuditLogAction.auto_moderation_user_communication_disabled))
760+
FOUND_CORRECT_AUDIT_LOG_ENTRY: bool = (
761+
(audit_log_entry.target is not None)
762+
and (audit_log_entry.target.id == after.id)
763+
and (
764+
audit_log_entry.action
765+
== discord.AuditLogAction.auto_moderation_user_communication_disabled
766+
)
767+
)
759768
if FOUND_CORRECT_AUDIT_LOG_ENTRY:
760769
await self._confirm_manual_add_strike(
761770
strike_user=after, action=audit_log_entry.action

0 commit comments

Comments
 (0)