summaryrefslogtreecommitdiff
path: root/plugins/display_corrections.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2018-08-15 13:13:17 +0200
committermathieui <mathieui@mathieui.net>2018-08-15 13:13:17 +0200
commit6e13b8b73572f9c0ac9b5c683b98a475afbeab38 (patch)
tree7dae86588339a8cf144b2d98c9280f28646341a9 /plugins/display_corrections.py
parentd1b624753bb5371cf287cc9d86bb685593a99315 (diff)
downloadpoezio-6e13b8b73572f9c0ac9b5c683b98a475afbeab38.tar.gz
poezio-6e13b8b73572f9c0ac9b5c683b98a475afbeab38.tar.bz2
poezio-6e13b8b73572f9c0ac9b5c683b98a475afbeab38.tar.xz
poezio-6e13b8b73572f9c0ac9b5c683b98a475afbeab38.zip
yapf -rip on plugins
Diffstat (limited to 'plugins/display_corrections.py')
-rw-r--r--plugins/display_corrections.py22
1 files changed, 15 insertions, 7 deletions
diff --git a/plugins/display_corrections.py b/plugins/display_corrections.py
index 8ed75e8b..22eb196d 100644
--- a/plugins/display_corrections.py
+++ b/plugins/display_corrections.py
@@ -26,14 +26,18 @@ from poezio.plugin import BasePlugin
from poezio.common import shell_split
from poezio import tabs
+
class Plugin(BasePlugin):
def init(self):
for tab_type in (tabs.MucTab, tabs.PrivateTab, tabs.ConversationTab):
- self.api.add_tab_command(tab_type, 'display_corrections',
- handler=self.command_display_corrections,
- usage='<number>',
- help='Display all the corrections of the number-th last corrected message.',
- short='Display the corrections of a message')
+ self.api.add_tab_command(
+ tab_type,
+ 'display_corrections',
+ handler=self.command_display_corrections,
+ usage='<number>',
+ help=
+ 'Display all the corrections of the number-th last corrected message.',
+ short='Display the corrections of a message')
def find_corrected(self, nb):
messages = self.api.get_conversation_messages()
@@ -60,9 +64,13 @@ class Plugin(BasePlugin):
if message:
display = []
while message:
- display.append('%s %s%s%s %s' % (message.str_time, '* ' if message.me else '', message.nickname, '' if message.me else '>', message.txt))
+ display.append('%s %s%s%s %s' %
+ (message.str_time, '* '
+ if message.me else '', message.nickname, ''
+ if message.me else '>', message.txt))
message = message.old_message
- self.api.information('Older versions:\n' + '\n'.join(display[::-1]), 'Info')
+ self.api.information(
+ 'Older versions:\n' + '\n'.join(display[::-1]), 'Info')
else:
self.api.information('No corrected message found.', 'Warning')