Skip to content
This repository was archived by the owner on Oct 4, 2023. It is now read-only.

Commit 3918486

Browse files
committed
More lint
1 parent 55b9392 commit 3918486

File tree

3 files changed

+14
-13
lines changed

3 files changed

+14
-13
lines changed

src/main.py

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ def run_bot():
3131

3232

3333
class BotkoDaemon(Daemon):
34+
3435
def run(self):
3536
run_bot()
3637

src/plugins/base.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def handle_message(self, channel, nick, msg, line):
3939
:param channel: Channel to which the message was sent to.
4040
:param nick: User which has sent the message.
4141
:param msg: Actual message.
42-
:param line: Raw line received from serve
42+
:param line: Raw line received from server
4343
"""
4444
raise NotImplementedError('handle_message not implemented')
4545

src/plugins/psywerx_groups.py

+12-12
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,19 @@ class PsywerxGroups(PsywerxPlugin):
88
def __init__(self, bot=None):
99
super(PsywerxGroups, self).__init__(bot=bot)
1010
self.actions = {
11-
'@mygroup': self._basicAction('irc/mygroups'),
12-
'@group': self._basicAction('irc/groups'),
13-
'@leaveall': self._basicAction('irc/leaveAll'),
14-
'@leave': self._leaveAction,
15-
'@join': self._joinAction,
11+
'@mygroup': self._basic_action('irc/mygroups'),
12+
'@group': self._basic_action('irc/groups'),
13+
'@leaveall': self._basic_action('irc/leaveAll'),
14+
'@leave': self._leave_action,
15+
'@join': self._join_action,
1616
}
1717

18-
def _basicAction(self, url):
18+
def _basic_action(self, url):
1919
def _req(channel, params, msg_lower):
2020
return self.request(channel, url, params)
2121
return _req
2222

23-
def _joinAction(self, channel, params, msg_lower):
23+
def _join_action(self, channel, params, msg_lower):
2424
def parse_join(splt):
2525
if len(splt) == 2:
2626
return splt[1].replace('@', ''), False
@@ -36,14 +36,14 @@ def parse_join(splt):
3636
params['offline'] = g[1]
3737
return self.request(channel, 'irc/join', params)
3838

39-
def _leaveAction(self, channel, params, msg_lower):
39+
def _leave_action(self, channel, params, msg_lower):
4040
splited = msg_lower.split(' ')
4141
if len(splited) == 2:
4242
group = splited[1].replace('@', '')
4343
params['group'] = group
4444
return self.request(channel, 'irc/leave', params)
4545

46-
def _handleActions(self, channel, nick, msg, line=None):
46+
def _handle_actions(self, channel, nick, msg, line=None):
4747
msg_lower = msg.lower()
4848
for a in self.actions.keys():
4949
if msg_lower.startswith(a):
@@ -54,7 +54,7 @@ def _handleActions(self, channel, nick, msg, line=None):
5454
return True
5555
return False
5656

57-
def _handleMentions(self, channel, nick, msg, line=None):
57+
def _handle_mentions(self, channel, nick, msg, line=None):
5858
msg_lower = msg.lower()
5959
mentions = set()
6060
offline_mentions = set()
@@ -88,5 +88,5 @@ def _handleMentions(self, channel, nick, msg, line=None):
8888
+ " " + msg, channel)
8989

9090
def handle_message(self, channel, nick, msg, line=None):
91-
if not self._handleActions(channel, nick, msg, line):
92-
self._handleMentions(channel, nick, msg, line)
91+
if not self._handle_actions(channel, nick, msg, line):
92+
self._handle_mentions(channel, nick, msg, line)

0 commit comments

Comments
 (0)