From ddcf2c6e122c5f58c00bca7bc7dda98316c4d3ba Mon Sep 17 00:00:00 2001 From: mbaruh Date: Tue, 28 Feb 2023 13:23:23 +0200 Subject: Use literals as defaults where possible Co-authored-by: wookie184 --- bot/exts/filtering/_filter_context.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bot/exts/filtering/_filter_context.py b/bot/exts/filtering/_filter_context.py index c5ebd3997..9faa16b53 100644 --- a/bot/exts/filtering/_filter_context.py +++ b/bot/exts/filtering/_filter_context.py @@ -35,14 +35,14 @@ class FilterContext: before_message: Message | None = None message_cache: MessageCache | None = None # Output context - dm_content: str = field(default_factory=str) # The content to DM the invoker - dm_embed: str = field(default_factory=str) # The embed description to DM the invoker - send_alert: bool = field(default=False) # Whether to send an alert for the moderators - alert_content: str = field(default_factory=str) # The content of the alert + dm_content: str = "" # The content to DM the invoker + dm_embed: str = "" # The embed description to DM the invoker + send_alert: bool = False # Whether to send an alert for the moderators + alert_content: str = "" # The content of the alert alert_embeds: list[Embed] = field(default_factory=list) # Any embeds to add to the alert action_descriptions: list = field(default_factory=list) # What actions were taken matches: list[str] = field(default_factory=list) # What exactly was found - notification_domain: str = field(default_factory=str) # A domain to send the user for context + notification_domain: str = "" # A domain to send the user for context filter_info: dict['Filter', str] = field(default_factory=dict) # Additional info from a filter. # Additional actions to perform additional_actions: list[Callable[[FilterContext], Coroutine]] = field(default_factory=list) -- cgit v1.2.3