summaryrefslogtreecommitdiff
path: root/plugins/code.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/code.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/code.py')
-rw-r--r--plugins/code.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/plugins/code.py b/plugins/code.py
index 69fc79ec..1c0679f2 100644
--- a/plugins/code.py
+++ b/plugins/code.py
@@ -30,12 +30,15 @@ from pygments.lexers import get_lexer_by_name
from pygments.formatters import HtmlFormatter
FORMATTER = HtmlFormatter(nowrap=True, noclasses=True)
+
class Plugin(BasePlugin):
def init(self):
- self.api.add_command('code', self.command_code,
- usage='<language> <code>',
- short='Sends syntax-highlighted code',
- help='Sends syntax-highlighted code in the current tab')
+ self.api.add_command(
+ 'code',
+ self.command_code,
+ usage='<language> <code>',
+ short='Sends syntax-highlighted code',
+ help='Sends syntax-highlighted code in the current tab')
def command_code(self, args):
language, code = args.split(None, 1)