Skip to content

Commit 69a272e

Browse files
committed
Fix a few bad refs and typos
1 parent 480ad57 commit 69a272e

File tree

8 files changed

+14
-16
lines changed

8 files changed

+14
-16
lines changed

bot.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
)
4747
from core.thread import ThreadManager
4848
from core.time import human_timedelta
49-
from core.utils import human_join, normalize_alias, truncate
49+
from core.utils import normalize_alias, truncate
5050

5151
logger = getLogger(__name__)
5252

@@ -1591,7 +1591,7 @@ def main():
15911591
# check discord version
15921592
if discord.__version__ != "1.6.0":
15931593
logger.error(
1594-
"Dependencies are not updated, run pipenv install. discord.py version expected 1.6.0, recieved %s",
1594+
"Dependencies are not updated, run pipenv install. discord.py version expected 1.6.0, received %s",
15951595
discord.__version__,
15961596
)
15971597
sys.exit(0)

cogs/modmail.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import asyncio
2-
from operator import truediv
32
import re
43
from datetime import datetime
54
from itertools import zip_longest

cogs/plugins.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -178,14 +178,14 @@ async def download_plugin(self, plugin, force=False):
178178
if raw == "Not Found":
179179
raise InvalidPluginError("Plugin not found")
180180
else:
181-
raise InvalidPluginError("Invalid download recieved, non-bytes object")
181+
raise InvalidPluginError("Invalid download received, non-bytes object")
182182

183-
plugin_io = io.BytesIO(raw)
184-
if not plugin.cache_path.parent.exists():
185-
plugin.cache_path.parent.mkdir(parents=True)
183+
plugin_io = io.BytesIO(raw)
184+
if not plugin.cache_path.parent.exists():
185+
plugin.cache_path.parent.mkdir(parents=True)
186186

187-
with plugin.cache_path.open("wb") as f:
188-
f.write(raw)
187+
with plugin.cache_path.open("wb") as f:
188+
f.write(raw)
189189

190190
with zipfile.ZipFile(plugin_io) as zipf:
191191
for info in zipf.infolist():
@@ -253,7 +253,7 @@ async def parse_user_input(self, ctx, plugin_name, check_version=False):
253253
description="Plugins are disabled, enable them by setting `ENABLE_PLUGINS=true`",
254254
color=self.bot.main_color,
255255
)
256-
await ctx.send(embed=em)
256+
await ctx.send(embed=embed)
257257
return
258258

259259
if not self._ready_event.is_set():

cogs/utility.py

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import os
44
import random
55
import re
6-
from sys import stdout
76
import traceback
87
from contextlib import redirect_stdout
98
from datetime import datetime

core/config.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from core._color_data import ALL_COLORS
1515
from core.models import DMDisabled, InvalidConfigError, Default, getLogger
1616
from core.time import UserFriendlyTimeSync
17-
from core.utils import strtobool, tryint
17+
from core.utils import strtobool
1818

1919
logger = getLogger(__name__)
2020
load_dotenv()

core/models.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -190,14 +190,13 @@ def get_value(self, key, args, kwds):
190190
except KeyError:
191191
return "{" + key + "}"
192192
else:
193-
return Formatter.get_value(key, args, kwds)
193+
return super().get_value(key, args, kwds)
194194

195195

196196
class SimilarCategoryConverter(commands.CategoryChannelConverter):
197197
async def convert(self, ctx, argument):
198198
bot = ctx.bot
199199
guild = ctx.guild
200-
result = None
201200

202201
try:
203202
return await super().convert(ctx, argument)

core/thread.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
import copy
33
import io
44
import re
5+
import time
56
import typing
67
from datetime import datetime, timedelta
7-
import time
88
from types import SimpleNamespace
99

1010
import isodate

core/utils.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"escape_code_block",
3131
"format_channel_name",
3232
"tryint",
33+
"match_title",
3334
]
3435

3536

@@ -222,7 +223,7 @@ def cleanup_code(content: str) -> str:
222223

223224
def match_title(text: str) -> int:
224225
"""
225-
Matches a title in the foramt of "Title: XXXX"
226+
Matches a title in the format of "Title: XXXX"
226227
227228
Parameters
228229
----------

0 commit comments

Comments
 (0)