refactor(all): add black to all code

This commit is contained in:
Romain J 2020-06-06 18:51:47 +02:00
commit 9869312ee8
19 changed files with 428 additions and 391 deletions
tuxbot/cogs/warnings

View file

@ -1,6 +1,18 @@
from collections import namedtuple
from .warnings import Warnings
from ...core.bot import Tux
VersionInfo = namedtuple("VersionInfo", "major minor micro releaselevel")
version_info = VersionInfo(major=1, minor=0, micro=0, releaselevel="alpha")
__version__ = "v{}.{}.{}-{}".format(
version_info.major,
version_info.minor,
version_info.micro,
version_info.releaselevel
).replace("\n", "")
def setup(bot: Tux):
bot.add_cog(Warnings(bot))

View file

@ -11,7 +11,7 @@ class Warnings(commands.Cog, name="Warnings"):
def __init__(self, bot: Tux):
self.bot = bot
@commands.group(name='warn', alias=['warning'])
@commands.group(name="warn", alias=["warning"])
@commands.guild_only()
@checks.is_mod()
async def _warn(self, ctx: commands.Context):
@ -20,28 +20,21 @@ class Warnings(commands.Cog, name="Warnings"):
@_warn.command(name="add")
@commands.guild_only()
async def _warn_add(
self,
ctx: commands.Context,
member: Union[discord.User, discord.Member],
reason: str
self,
ctx: commands.Context,
member: Union[discord.User, discord.Member],
reason: str,
):
pass
@_warn.command(name="delete", aliases=["del", "remove"])
@commands.guild_only()
async def action_del(
self,
ctx: commands.Context,
warn_id: int,
reason: str = ""
):
async def action_del(self, ctx: commands.Context, warn_id: int, reason: str = ""):
pass
@_warn.command(name="list", aliases=["all"])
@commands.guild_only()
async def action_del(
self,
ctx: commands.Context,
member: Union[discord.User, discord.Member] = None
self, ctx: commands.Context, member: Union[discord.User, discord.Member] = None
):
pass