Reformat with Black 22.1.0

This commit is contained in:
jack1142
2022-03-22 18:06:46 +01:00
parent f6d9632c8f
commit c69e8d31fd
39 changed files with 25 additions and 78 deletions

View File

@@ -107,7 +107,7 @@ class HelpSettings:
@property
def pretty(self):
""" Returns a discord safe representation of the settings """
"""Returns a discord safe representation of the settings"""
def bool_transformer(val):
if val is False:
@@ -306,7 +306,6 @@ class RedHelpFormatter(HelpFormatterABC):
async def format_command_help(
self, ctx: Context, obj: commands.Command, help_settings: HelpSettings
):
send = help_settings.verify_exists
if not send:
async for __ in self.help_filter_func(
@@ -450,7 +449,6 @@ class RedHelpFormatter(HelpFormatterABC):
@staticmethod
def group_embed_fields(fields: List[EmbedField], max_chars=1000):
curr_group = []
ret = []
current_count = 0
@@ -473,7 +471,6 @@ class RedHelpFormatter(HelpFormatterABC):
return ret
async def make_and_send_embeds(self, ctx, embed_dict: dict, help_settings: HelpSettings):
pages = []
page_char_limit = help_settings.page_char_limit
@@ -544,7 +541,6 @@ class RedHelpFormatter(HelpFormatterABC):
await self.send_pages(ctx, pages, embed=True, help_settings=help_settings)
async def format_cog_help(self, ctx: Context, obj: commands.Cog, help_settings: HelpSettings):
coms = await self.get_cog_help_mapping(ctx, obj, help_settings=help_settings)
if not (coms or help_settings.verify_exists):
return
@@ -613,7 +609,6 @@ class RedHelpFormatter(HelpFormatterABC):
await self.send_pages(ctx, pages, embed=False, help_settings=help_settings)
async def format_bot_help(self, ctx: Context, help_settings: HelpSettings):
coms = await self.get_bot_help_mapping(ctx, help_settings=help_settings)
if not coms:
return
@@ -622,7 +617,6 @@ class RedHelpFormatter(HelpFormatterABC):
tagline = (help_settings.tagline) or self.get_default_tagline(ctx)
if await self.embed_requested(ctx):
emb = {"embed": {"title": "", "description": ""}, "footer": {"text": ""}, "fields": []}
emb["footer"]["text"] = tagline
@@ -630,7 +624,6 @@ class RedHelpFormatter(HelpFormatterABC):
emb["embed"]["title"] = f"*{description[:250]}*"
for cog_name, data in coms:
if cog_name:
title = underline(bold(f"{cog_name}:"), escape_formatting=False)
else:
@@ -676,7 +669,6 @@ class RedHelpFormatter(HelpFormatterABC):
yield nm, doc, max_width - width_gap
for cog_name, data in coms:
title = f"{cog_name}:" if cog_name else _("No Category:")
to_join.append(title)
@@ -830,7 +822,6 @@ class RedHelpFormatter(HelpFormatterABC):
and channel_permissions.read_message_history
and help_settings.use_menus
):
max_pages_in_guild = help_settings.max_pages_in_guild
use_DMs = len(pages) > max_pages_in_guild
destination = ctx.author if use_DMs else ctx.channel
@@ -862,7 +853,6 @@ class RedHelpFormatter(HelpFormatterABC):
and delete_delay > 0 # delete delay is enabled
and channel_permissions.manage_messages # we can manage messages here
):
# We need to wrap this in a task to not block after-sending-help interactions.
# The channel has to be TextChannel as we can't bulk-delete from DMs
async def _delete_delay_help(