Skip to content

Commit eacb396

Browse files
run lint config
1 parent bc935cd commit eacb396

File tree

11 files changed

+59
-50
lines changed

11 files changed

+59
-50
lines changed

docs/.requirements.txt

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,21 @@
1-
click==8.1.7 ; python_version >= "3.8" and python_version < "4.0"
2-
colorama==0.4.6 ; python_version >= "3.8" and python_version < "4.0" and platform_system == "Windows"
3-
ghp-import==2.1.0 ; python_version >= "3.8" and python_version < "4.0"
4-
importlib-metadata==8.5.0 ; python_version >= "3.8" and python_version < "3.10"
5-
jinja2==3.1.4 ; python_version >= "3.8" and python_version < "4.0"
6-
markdown==3.7 ; python_version >= "3.8" and python_version < "4.0"
7-
markupsafe==2.1.5 ; python_version >= "3.8" and python_version < "4.0"
1+
click==8.0.3 ; python_version >= "3.8" and python_version < "4.0"
2+
colorama==0.4.4 ; python_version >= "3.8" and python_version < "4.0" and platform_system == "Windows"
3+
ghp-import==2.0.1 ; python_version >= "3.8" and python_version < "4.0"
4+
importlib-metadata==4.8.1 ; python_version >= "3.8" and python_version < "4.0"
5+
jinja2==3.0.1 ; python_version >= "3.8" and python_version < "4.0"
6+
markdown==3.3.4 ; python_version >= "3.8" and python_version < "4.0"
7+
markupsafe==2.0.1 ; python_version >= "3.8" and python_version < "4.0"
88
mergedeep==1.3.4 ; python_version >= "3.8" and python_version < "4.0"
9-
mkdocs-get-deps==0.2.0 ; python_version >= "3.8" and python_version < "4.0"
109
mkdocs-markdownextradata-plugin==0.1.9 ; python_version >= "3.8" and python_version < "4.0"
11-
mkdocs-material-extensions==1.3.1 ; python_version >= "3.8" and python_version < "4.0"
12-
mkdocs-material==7.3.6 ; python_version >= "3.8" and python_version < "4.0"
13-
mkdocs==1.6.1 ; python_version >= "3.8" and python_version < "4.0"
10+
mkdocs-material-extensions==1.0.3 ; python_version >= "3.8" and python_version < "4.0"
11+
mkdocs-material==7.2.6 ; python_version >= "3.8" and python_version < "4.0"
12+
mkdocs==1.2.3 ; python_version >= "3.8" and python_version < "4.0"
1413
packaging==24.1 ; python_version >= "3.8" and python_version < "4.0"
15-
pathspec==0.12.1 ; python_version >= "3.8" and python_version < "4.0"
16-
platformdirs==4.3.6 ; python_version >= "3.8" and python_version < "4.0"
17-
pygments==2.18.0 ; python_version >= "3.8" and python_version < "4.0"
18-
pymdown-extensions==10.10.1 ; python_version >= "3.8" and python_version < "4.0"
19-
python-dateutil==2.9.0.post0 ; python_version >= "3.8" and python_version < "4.0"
14+
pygments==2.10.0 ; python_version >= "3.8" and python_version < "4.0"
15+
pymdown-extensions==8.2 ; python_version >= "3.8" and python_version < "4.0"
16+
python-dateutil==2.8.2 ; python_version >= "3.8" and python_version < "4.0"
2017
pyyaml-env-tag==0.1 ; python_version >= "3.8" and python_version < "4.0"
2118
pyyaml==5.4.1 ; python_version >= "3.8" and python_version < "4.0"
2219
six==1.16.0 ; python_version >= "3.8" and python_version < "4.0"
23-
watchdog==4.0.2 ; python_version >= "3.8" and python_version < "4.0"
24-
zipp==3.20.2 ; python_version >= "3.8" and python_version < "3.10"
20+
watchdog==2.1.5 ; python_version >= "3.8" and python_version < "4.0"
21+
zipp==3.5.0 ; python_version >= "3.8" and python_version < "4.0"

modmail/config.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,9 +202,9 @@ class ConfigMetadata:
202202
# as a solution, I'm implementing a field which can provide a rich converter object,
203203
# in the style that discord.py uses. This will be called like discord py calls.
204204
discord_converter: discord.ext.commands.converter.Converter = attr.ib(default=None)
205-
discord_converter_attribute: typing.Optional[
206-
types.FunctionType
207-
] = None # if we want an attribute off of the converted value
205+
discord_converter_attribute: typing.Optional[types.FunctionType] = (
206+
None # if we want an attribute off of the converted value
207+
)
208208

209209
# hidden values do not show up in the bot configuration menu
210210
hidden: bool = False

modmail/dispatcher.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def activate(self, instance: object) -> None:
8080
if underlying_function not in self.pending_handlers:
8181
continue
8282

83-
for (event_name, priority) in self.pending_handlers[underlying_function]:
83+
for event_name, priority in self.pending_handlers[underlying_function]:
8484
self._register_handler(event_name, priority, value)
8585
self.pending_handlers[underlying_function].clear()
8686

modmail/extensions/threads.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,9 @@ def __init__(self, bot: "ModmailBot"):
136136
super().__init__(bot)
137137
# validation for this configuration variable is be defered to fully implementing
138138
# a new configuration system
139-
self.relay_channel: Union[
140-
discord.TextChannel, discord.PartialMessageable
141-
] = self.bot.get_partial_messageable(self.bot.config.user.threads.relay_channel_id)
139+
self.relay_channel: Union[discord.TextChannel, discord.PartialMessageable] = (
140+
self.bot.get_partial_messageable(self.bot.config.user.threads.relay_channel_id)
141+
)
142142

143143
self.dms_to_users: Dict[int, int] = dict() # key: dm_channel.id, value: user.id
144144

modmail/plugins/local/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Plugins should be like normal discord cogs, but should subclass `PluginCog` from
77
```py
88
from modmail.plugin_helpers import PluginCog
99

10+
1011
class MyPlugin(PluginCog):
1112
pass
1213
```

modmail/utils/pagination.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
44
Originally adapated from: https://github.com/khk4912/EZPaginator/tree/84b5213741a78de266677b805c6f694ad94fedd6
55
"""
6+
67
from __future__ import annotations
78

89
import logging

modmail/utils/responses.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
Note: these are to used for general success or general errors. Typically, the error handler will make a
77
response if a command raises a discord.ext.commands.CommandError exception.
88
"""
9+
910
import logging
1011
import random
1112
import typing

modmail/utils/threads/models.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ def __init__(
7373
"""
7474
self.thread = thread
7575
self.recipient = recipient
76-
self.log_message: Union[
77-
discord.Message, discord.PartialMessage
78-
] = log_message or self.thread.parent.get_partial_message(self.thread.id)
76+
self.log_message: Union[discord.Message, discord.PartialMessage] = (
77+
log_message or self.thread.parent.get_partial_message(self.thread.id)
78+
)
7979
self.messages = MessageDict()
8080
self.close_after = self.thread.auto_archive_duration
8181
self.has_sent_initial_message = has_sent_initial_message

requirements.txt

Lines changed: 29 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,31 @@
1-
click==8.1.7 ; python_version >= "3.8" and python_version < "4.0"
2-
colorama==0.4.6 ; python_version >= "3.8" and python_version < "4.0" and platform_system == "Windows"
3-
ghp-import==2.1.0 ; python_version >= "3.8" and python_version < "4.0"
4-
importlib-metadata==8.5.0 ; python_version >= "3.8" and python_version < "3.10"
5-
jinja2==3.1.4 ; python_version >= "3.8" and python_version < "4.0"
6-
markdown==3.7 ; python_version >= "3.8" and python_version < "4.0"
7-
markupsafe==2.1.5 ; python_version >= "3.8" and python_version < "4.0"
8-
mergedeep==1.3.4 ; python_version >= "3.8" and python_version < "4.0"
9-
mkdocs-get-deps==0.2.0 ; python_version >= "3.8" and python_version < "4.0"
10-
mkdocs-markdownextradata-plugin==0.1.9 ; python_version >= "3.8" and python_version < "4.0"
11-
mkdocs-material-extensions==1.3.1 ; python_version >= "3.8" and python_version < "4.0"
12-
mkdocs-material==7.3.6 ; python_version >= "3.8" and python_version < "4.0"
13-
mkdocs==1.6.1 ; python_version >= "3.8" and python_version < "4.0"
14-
packaging==24.1 ; python_version >= "3.8" and python_version < "4.0"
15-
pathspec==0.12.1 ; python_version >= "3.8" and python_version < "4.0"
16-
platformdirs==4.3.6 ; python_version >= "3.8" and python_version < "4.0"
17-
pygments==2.18.0 ; python_version >= "3.8" and python_version < "4.0"
18-
pymdown-extensions==10.10.1 ; python_version >= "3.8" and python_version < "4.0"
19-
python-dateutil==2.9.0.post0 ; python_version >= "3.8" and python_version < "4.0"
20-
pyyaml-env-tag==0.1 ; python_version >= "3.8" and python_version < "4.0"
1+
aiodns==3.0.0 ; python_version >= "3.8" and python_version < "4.0"
2+
aiohttp==3.7.4.post0 ; python_version >= "3.8" and python_version < "4.0"
3+
aiohttp[speedups]==3.7.4.post0 ; python_version >= "3.8" and python_version < "4.0"
4+
arrow==1.1.1 ; python_version >= "3.8" and python_version < "4.0"
5+
async-timeout==3.0.1 ; python_version >= "3.8" and python_version < "4.0"
6+
atoml==1.0.3 ; python_version >= "3.8" and python_version < "4.0"
7+
attrs==21.2.0 ; python_version >= "3.8" and python_version < "4.0"
8+
brotlipy==0.7.0 ; python_version >= "3.8" and python_version < "4.0"
9+
cchardet==2.1.7 ; python_version >= "3.8" and python_version < "4.0"
10+
cffi==1.15.0 ; python_version >= "3.8" and python_version < "4.0"
11+
chardet==4.0.0 ; python_version >= "3.8" and python_version < "4.0"
12+
colorama==0.4.4 ; python_version >= "3.8" and python_version < "4.0"
13+
coloredlogs==15.0.1 ; python_version >= "3.8" and python_version < "4.0"
14+
desert==2020.11.18 ; python_version >= "3.8" and python_version < "4.0"
15+
discord-py @ https://github.com/Rapptz/discord.py/archive/45d498c1b76deaf3b394d17ccf56112fa691d160.zip ; python_version >= "3.8" and python_version < "4.0"
16+
humanfriendly==10.0 ; python_version >= "3.8" and python_version < "4.0"
17+
idna==3.2 ; python_version >= "3.8" and python_version < "4.0"
18+
marshmallow-enum==1.5.1 ; python_version >= "3.8" and python_version < "4.0"
19+
marshmallow==3.13.0 ; python_version >= "3.8" and python_version < "4.0"
20+
multidict==5.2.0 ; python_version >= "3.8" and python_version < "4.0"
21+
mypy-extensions==0.4.3 ; python_version >= "3.8" and python_version < "4.0"
22+
pycares==4.1.2 ; python_version >= "3.8" and python_version < "4.0"
23+
pycparser==2.20 ; python_version >= "3.8" and python_version < "4.0"
24+
pyreadline3==3.3 ; sys_platform == "win32" and python_version >= "3.8" and python_version < "4.0"
25+
python-dateutil==2.8.2 ; python_version >= "3.8" and python_version < "4.0"
26+
python-dotenv==0.19.2 ; python_version >= "3.8" and python_version < "4.0"
2127
pyyaml==5.4.1 ; python_version >= "3.8" and python_version < "4.0"
2228
six==1.16.0 ; python_version >= "3.8" and python_version < "4.0"
23-
watchdog==4.0.2 ; python_version >= "3.8" and python_version < "4.0"
24-
zipp==3.20.2 ; python_version >= "3.8" and python_version < "3.10"
29+
typing-extensions==4.12.2 ; python_version >= "3.8" and python_version < "4.0"
30+
typing-inspect==0.7.1 ; python_version >= "3.8" and python_version < "4.0"
31+
yarl==1.7.2 ; python_version >= "3.8" and python_version < "4.0"

scripts/export_new_config_to_default_config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
44
This is intended to be used as a local pre-commit hook, which runs if the modmail/config.py file is changed.
55
"""
6+
67
import difflib
78
import json
89
import os

tests/mocks.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
3232
SOFTWARE.
3333
"""
34+
3435
from __future__ import annotations
3536

3637
import asyncio

0 commit comments

Comments
 (0)