Skip to content

Commit b8560a3

Browse files
committed
Corrected some lint errors
1 parent 30e3e34 commit b8560a3

File tree

4 files changed

+27
-9
lines changed

4 files changed

+27
-9
lines changed

bot.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@
3434
from datetime import datetime
3535
from types import SimpleNamespace
3636

37-
from pkg_resources import parse_version
38-
3937
import discord
4038
from discord.ext import commands
4139
from discord.ext.commands.view import StringView
@@ -46,6 +44,7 @@
4644
from colorama import init, Fore, Style
4745
from emoji import UNICODE_EMOJI
4846
from motor.motor_asyncio import AsyncIOMotorClient
47+
from pkg_resources import parse_version
4948

5049
from core.changelog import Changelog
5150
from core.clients import ApiClient, PluginDatabaseClient
@@ -480,7 +479,7 @@ async def process_modmail(self, message: discord.Message) -> None:
480479
logger.warning(
481480
"The account age limit needs to be a "
482481
"ISO-8601 duration formatted duration string "
483-
f'greater than 0 days, not "%s".',
482+
'greater than 0 days, not "%s".',
484483
str(account_age),
485484
)
486485
del self.config.cache["account_age"]
@@ -496,7 +495,7 @@ async def process_modmail(self, message: discord.Message) -> None:
496495
logger.warning(
497496
"The guild join age limit needs to be a "
498497
"ISO-8601 duration formatted duration string "
499-
f'greater than 0 days, not "%s".',
498+
'greater than 0 days, not "%s".',
500499
str(guild_age),
501500
)
502501
del self.config.cache["guild_age"]

cogs/plugins.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,11 @@
1010
import sys
1111
from difflib import get_close_matches
1212

13-
from pkg_resources import parse_version
14-
1513
import discord
1614
from discord.ext import commands
1715
from discord.utils import async_all
1816

17+
from pkg_resources import parse_version
1918

2019
from core import checks
2120
from core.models import PermissionLevel
@@ -181,7 +180,7 @@ async def plugin_add(self, ctx, *, plugin_name: str):
181180
embed = discord.Embed(
182181
description="Downloading this plugin...", color=self.bot.main_color
183182
)
184-
message = await ctx.send(embed=embed)
183+
await ctx.send(embed=embed)
185184

186185
async with ctx.typing():
187186
if len(plugin_name.split("/")) >= 3:

cogs/utility.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111
from json import JSONDecodeError
1212
from textwrap import indent
1313

14-
from pkg_resources import parse_version
15-
1614
from discord import Embed, Color, Activity, Role
1715
from discord.enums import ActivityType, Status
1816
from discord.ext import commands
1917

2018
from aiohttp import ClientResponseError
19+
from pkg_resources import parse_version
20+
2121
from core import checks
2222
from core.changelog import Changelog
2323
from core.decorators import github_access_token_required, trigger_typing

pyproject.toml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
[tool.black]
2+
line-length = 88
3+
target-version = ['py37']
4+
include = '\.pyi?$'
5+
exclude = '''
6+
7+
(
8+
/(
9+
\.eggs
10+
| \.git
11+
| \.venv
12+
| venv
13+
| _build
14+
| build
15+
| dist
16+
| plugins
17+
| temp
18+
)/
19+
)
20+
'''

0 commit comments

Comments
 (0)