From 11283adc3858e88bfbf69e1751f9cc6fccbb8c18 Mon Sep 17 00:00:00 2001 From: kosayoda Date: Thu, 8 Oct 2020 17:18:06 +0800 Subject: Improve default argument. --- bot/exts/moderation/infraction/_scheduler.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/bot/exts/moderation/infraction/_scheduler.py b/bot/exts/moderation/infraction/_scheduler.py index b68921dad..5c3e445f6 100644 --- a/bot/exts/moderation/infraction/_scheduler.py +++ b/bot/exts/moderation/infraction/_scheduler.py @@ -83,7 +83,7 @@ class InfractionScheduler: user: UserSnowflake, action_coro: t.Optional[t.Awaitable] = None, user_reason: t.Optional[str] = None, - additional_info: t.Optional[str] = None, + additional_info: t.Optional[str] = "", ) -> bool: """ Apply an infraction to the user, log the infraction, and optionally notify the user. @@ -102,9 +102,6 @@ class InfractionScheduler: if user_reason is None: user_reason = reason - if additional_info is not None: - additional_info = "" - log.trace(f"Applying {infr_type} infraction #{id_} to {user}.") # Default values for the confirmation message and mod log. -- cgit v1.2.3