From 54b42231c439424ff6b05f8377091294b0088b95 Mon Sep 17 00:00:00 2001 From: ajax146 <31014239+ajax146@users.noreply.github.com> Date: Tue, 16 Apr 2024 22:22:17 -0400 Subject: [PATCH] Fix all flake8 DOC110 issues --- techsupport_bot/commands/factoids.py | 6 +++--- techsupport_bot/commands/modmail.py | 7 +++++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/techsupport_bot/commands/factoids.py b/techsupport_bot/commands/factoids.py index f9fc838df..b93c20772 100644 --- a/techsupport_bot/commands/factoids.py +++ b/techsupport_bot/commands/factoids.py @@ -236,7 +236,7 @@ async def create_factoid_call( embed_config (str): Whether the factoid has an embed set up alias (str, optional): The parent factoid. Defaults to None. - Raises: + Raises: custom_errors.TooLongFactoidMessageError: When the message argument is over 2k chars, discords limit """ @@ -433,11 +433,11 @@ async def check_alias_recursion( return False - def get_embed_from_factoid(self, factoid) -> discord.Embed: + def get_embed_from_factoid(self, factoid: bot.models.Factoid) -> discord.Embed: """Gets the factoid embed from its message. Args: - (Factoid) factoid: The factoid to get the json of + factoid (bot.models.Factoid): The factoid to get the json of Returns: discord.Embed: The embed of the factoid diff --git a/techsupport_bot/commands/modmail.py b/techsupport_bot/commands/modmail.py index 9d9e71418..a2d007226 100644 --- a/techsupport_bot/commands/modmail.py +++ b/techsupport_bot/commands/modmail.py @@ -20,6 +20,7 @@ import discord import expiringdict +import munch import ui from core import auxiliary, cogs, extensionconfig from discord.ext import commands @@ -28,13 +29,15 @@ import bot -async def has_modmail_management_role(ctx: commands.Context, config=None) -> bool: +async def has_modmail_management_role( + ctx: commands.Context, config: munch.Munch = None +) -> bool: """-COMMAND CHECK- Checks if the invoker has a modmail management role Args: ctx (commands.Context): Context used for getting the config file - config (): Can be defined manually to run this without providing actual ctx + config (munch.Munch): Can be defined manually to run this without providing actual ctx Raises: commands.CommandError: No modmail management roles were assigned in the config