Skip to content

Commit cc1fe2a

Browse files
authored
Merge pull request #356 from TotallyNotRobots/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2 parents 3f2db1e + aa24ad6 commit cc1fe2a

File tree

12 files changed

+22
-22
lines changed

12 files changed

+22
-22
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ repos:
3333
args:
3434
- --remove
3535
- repo: https://github.com/psf/black
36-
rev: e66be67b9b6811913470f70c28b4d50f94d05b22 # frozen: 20.8b1
36+
rev: 67d5532c3392280de0ce717a1ab728eca2beb698 # frozen: 21.4b0
3737
hooks:
3838
- id: black
3939
- repo: https://github.com/pycqa/isort

cloudbot/bot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ def register_client(self, name, cls):
211211
self.clients[name] = cls
212212

213213
def create_connections(self):
214-
""" Create a BotConnection for all the networks defined in the config """
214+
"""Create a BotConnection for all the networks defined in the config"""
215215
for config in self.config["connections"]:
216216
# strip all spaces and capitalization from the connection name
217217
name = clean_name(config["name"])

cloudbot/clients/irc.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ class IrcClient(Client):
114114
"""
115115

116116
def __init__(self, bot, _type, name, nick, *, channels=None, config=None):
117-
""""""
117+
""" """
118118
super().__init__(
119119
bot, _type, name, nick, channels=channels, config=config
120120
)
@@ -406,10 +406,10 @@ def is_nick_valid(self, nick):
406406

407407

408408
class _IrcProtocol(asyncio.Protocol):
409-
""""""
409+
""" """
410410

411411
def __init__(self, conn):
412-
""""""
412+
""" """
413413
self.loop = conn.loop
414414
self.bot = conn.bot
415415
self.conn = conn

cloudbot/plugin.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ def _log_hook(self, hook):
492492
logger.debug("Loaded %r", hook)
493493

494494
def _execute_hook_threaded(self, hook, event):
495-
""""""
495+
""" """
496496
event.prepare_threaded()
497497

498498
try:
@@ -501,7 +501,7 @@ def _execute_hook_threaded(self, hook, event):
501501
event.close_threaded()
502502

503503
async def _execute_hook_sync(self, hook, event):
504-
""""""
504+
""" """
505505
await event.prepare()
506506

507507
try:
@@ -570,7 +570,7 @@ async def _execute_hook(self, hook, event):
570570
return ok
571571

572572
async def _sieve(self, sieve, event, hook):
573-
""""""
573+
""" """
574574
if sieve.threaded:
575575
coro = self.bot.loop.run_in_executor(
576576
None, sieve.function, self.bot, event, hook
@@ -659,7 +659,7 @@ class Plugin:
659659
"""
660660

661661
def __init__(self, filepath, filename, title, code):
662-
""""""
662+
""" """
663663
self.tasks = []
664664
self.file_path = filepath
665665
self.file_name = filename

cloudbot/plugin_hooks.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class Hook:
1414
"""
1515

1616
def __init__(self, _type, plugin, func_hook):
17-
""""""
17+
""" """
1818
self.type = _type
1919
self.plugin = plugin
2020
self.function = func_hook.function
@@ -173,7 +173,7 @@ def __str__(self):
173173

174174
class SieveHook(Hook):
175175
def __init__(self, plugin, sieve_hook):
176-
""""""
176+
""" """
177177
super().__init__("sieve", plugin, sieve_hook)
178178

179179
def __repr__(self):
@@ -206,7 +206,7 @@ def __str__(self):
206206

207207
class OnStartHook(Hook):
208208
def __init__(self, plugin, on_start_hook):
209-
""""""
209+
""" """
210210
super().__init__("on_start", plugin, on_start_hook)
211211

212212
def __repr__(self):
@@ -260,7 +260,7 @@ def __init__(self, plugin, base_hook):
260260

261261
class OnConnectHook(Hook):
262262
def __init__(self, plugin, sieve_hook):
263-
""""""
263+
""" """
264264
super().__init__("on_connect", plugin, sieve_hook)
265265

266266
def __repr__(self):

plugins/admin_channel.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def check_for_chan_mode(char, mode_warn, event):
2323

2424

2525
def mode_cmd(mode, text, text_inp, chan, nick, event, mode_warn=True):
26-
""" generic mode setting function """
26+
"""generic mode setting function"""
2727
if not check_for_chan_mode(mode[1], mode_warn, event):
2828
return False
2929

@@ -51,7 +51,7 @@ def mode_cmd(mode, text, text_inp, chan, nick, event, mode_warn=True):
5151

5252

5353
def mode_cmd_no_target(mode, text, text_inp, chan, event, mode_warn=True):
54-
""" generic mode setting function without a target"""
54+
"""generic mode setting function without a target"""
5555
if not check_for_chan_mode(mode[1], mode_warn, event):
5656
return False
5757

plugins/attacks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class RespType(Enum):
1616

1717

1818
def is_self(conn, target):
19-
""" Checks if a string is "****self" or contains conn.name. """
19+
"""Checks if a string is "****self" or contains conn.name."""
2020
return bool(
2121
re.search(
2222
"(^..?.?.?self|{})".format(re.escape(conn.nick)), target, re.I

plugins/mylife.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def get_soup(url):
1717

1818
@hook.on_start()
1919
async def refresh_fml_cache(loop):
20-
""" gets a page of random FMLs and puts them into a dictionary """
20+
"""gets a page of random FMLs and puts them into a dictionary"""
2121
url = "http://www.fmylife.com/random"
2222
soup = await loop.run_in_executor(None, get_soup, url)
2323

plugins/profile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def profile(text, chan, notice, nick):
124124

125125
@hook.command()
126126
def profileadd(text, chan, nick, notice, db):
127-
"""<category> <content> - Adds data to your profile in the current channel under \"<category>\""""
127+
"""<category> <content> - Adds data to your profile in the current channel under \"<category>\" """
128128
if nick.casefold() == chan.casefold():
129129
return "Profile data can not be set outside of channels"
130130

plugins/reddit_info.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def get_post(post_id):
6969

7070

7171
def format_output(item, show_url=False):
72-
""" takes a reddit post and returns a formatted string """
72+
"""takes a reddit post and returns a formatted string"""
7373
item["title"] = formatting.truncate(item["title"], 70)
7474
item["link"] = short_url.format(item["id"])
7575

0 commit comments

Comments
 (0)