Skip to content

Commit

Permalink
[CI/CD] Run pre-commit manually
Browse files Browse the repository at this point in the history
  • Loading branch information
npc203 committed Jul 21, 2024
1 parent 356c0df commit 03c0f1e
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 22 deletions.
6 changes: 3 additions & 3 deletions customhelp/core/base_help.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import asyncio
import logging
from collections import namedtuple
from collections import Counter, namedtuple
from collections.abc import Iterable
from itertools import chain
from typing import Any, Dict, List, Optional, Union, cast
Expand All @@ -12,7 +12,7 @@
from redbot.core.commands.help import HelpSettings, NoCommand, NoSubCommand, _, dpy_commands
from redbot.core.utils.chat_formatting import pagify
from redbot.core.utils.mod import mass_purge
from collections import Counter

from customhelp.core.views import (
BaseInteractionMenu,
ReactButton,
Expand All @@ -25,10 +25,10 @@
from .dpy_menus import BaseMenu, arrow_react, home_react, react_page
from .utils import (
get_aliases,
get_category_page_mapper_chunk,
get_cooldowns,
get_perms,
shorten_line,
get_category_page_mapper_chunk,
)

LOG = logging.getLogger("red.customhelp.core.base_help")
Expand Down
2 changes: 1 addition & 1 deletion customhelp/core/category.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from dataclasses import dataclass, asdict
from dataclasses import asdict, dataclass
from typing import Optional

import discord
Expand Down
4 changes: 1 addition & 3 deletions customhelp/core/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,7 @@ async def start(
**self._get_kwargs_from_page(self.hmenu.pages[0]),
view=self,
mention_author=False,
reference=ctx.message.to_reference(
fail_if_not_exists=False
),
reference=ctx.message.to_reference(fail_if_not_exists=False),
)
else:
self.message = await ctx.send(
Expand Down
4 changes: 3 additions & 1 deletion customhelp/customhelp.py
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,9 @@ async def type_(self, ctx):
discord.SelectOption(
label="Select", description="Minimalistic Dropdown Menus", emoji="⏬"
),
discord.SelectOption(label="Hidden", description="No components are shown", emoji="🥷"),
discord.SelectOption(
label="Hidden", description="No components are shown", emoji="🥷"
),
]
select_bar_view = MenuView(ctx.author.id, self.config.settings, self._update_conf)
select_bar_view.add_item(MenuPicker(ComponentType.MENU, options))
Expand Down
2 changes: 1 addition & 1 deletion customhelp/themes/dank.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
cast,
commands,
get_aliases,
get_category_page_mapper_chunk,
get_cooldowns,
get_perms,
pagify,
get_category_page_mapper_chunk,
)


Expand Down
2 changes: 1 addition & 1 deletion customhelp/themes/danny.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
EmbedField,
HelpSettings,
_,
pagify,
get_category_page_mapper_chunk,
pagify,
)


Expand Down
2 changes: 1 addition & 1 deletion customhelp/themes/minimal.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
chain,
commands,
get_aliases,
get_category_page_mapper_chunk,
get_cooldowns,
get_perms,
pagify,
get_category_page_mapper_chunk,
)


Expand Down
2 changes: 1 addition & 1 deletion customhelp/themes/mix.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
_,
chain,
commands,
get_category_page_mapper_chunk,
pagify,
shorten_line,
get_category_page_mapper_chunk,
)


Expand Down
2 changes: 1 addition & 1 deletion customhelp/themes/nadeko.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
EmbedField,
HelpSettings,
_,
pagify,
get_category_page_mapper_chunk,
pagify,
)


Expand Down
2 changes: 1 addition & 1 deletion customhelp/themes/twin.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
EmbedField,
HelpSettings,
_,
pagify,
get_category_page_mapper_chunk,
pagify,
)


Expand Down
14 changes: 7 additions & 7 deletions docs/source/customhelp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ A Customisable Custom Help Cog For Red:
| This cog is made cause I didn't like 30 help pages for my bot and I wanted to bunch my cogs.
|
| Use ``[p]chelp`` to see what can be customised and ``[p]chelp set`` for even more customisations.
|
|
| As an additional bonus, if you have the alias cog loaded, those aliases will also be retrieved.
Setup
-----
*Note: Use* ``[p]chelp toggle 1`` *to set your help to the custom help, else it'll remain as the normal one*
*Note: Use* ``[p]chelp toggle 1`` *to set your help to the custom help, else it'll remain as the normal one*

1. | Start by doing ``[p]chelp list`` to list all your cogs

Expand Down Expand Up @@ -121,7 +121,7 @@ Category Configuration
Custom Help Settings
--------------------

| Additional settings in Custom Help can be configured via ``[p]chelp set``, including but not limited to
| Additional settings in Custom Help can be configured via ``[p]chelp set``, including but not limited to
| custom navigation, thumbnails, using replies, and more.
1. | ``[p]chelp set arrows``
Expand All @@ -132,7 +132,7 @@ Custom Help Settings
.. note::
The valid arrows are ``left``, ``right``, ``cross``, ``home``, ``force_left`` and ``force_right``

.. code-block:: yaml
Example:
Expand All @@ -142,7 +142,7 @@ Custom Help Settings
- label: 'text is cool'
2. | ``[p]chelp set thumbnail``
| If you ever wanted to add a little image on the top right of the embed, you can set the image
| If you ever wanted to add a little image on the top right of the embed, you can set the image
| for the thumbnail with a valid link.
.. note::
Expand All @@ -152,7 +152,7 @@ Custom Help Settings
| This will change how long the reaction menu stays (in seconds) before being removed.
4. | ``[p]chelp set type``
| This command enables the owner to change the menutype/arrowtype to buttons, dropdowns or just reactions
| This command enables the owner to change the menutype/arrowtype to buttons, dropdowns or just reactions
5. | ``[p]chelp set usereply``
| This will have the bot reply to your message after using commands.
Expand Down Expand Up @@ -266,4 +266,4 @@ Command Changes
- ``chelp set`` now has a new subcommand ``nav`` to toggle the navigation arrows
- ``chelp show`` shows more info now
- ``chelp set type`` for setting the menu and arrow type
- chelp create and edit now have more arguments for button/dropdown customisability
- chelp create and edit now have more arguments for button/dropdown customisability
2 changes: 1 addition & 1 deletion snipe/snipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ async def format_page(self, menu, msg):
emb.add_field(name="Deleted At", value=f"<t:{msg.deleted_at}:R>")
emb.set_footer(
text=f"Sniped at {menu.ctx.guild} | Page {menu.current_page+1}/{self._max_pages}",
icon_url=getattr(menu.ctx.guild.icon,"url",None),
icon_url=getattr(menu.ctx.guild.icon, "url", None),
)

return emb
Expand Down

0 comments on commit 03c0f1e

Please sign in to comment.