Skip to content
This repository was archived by the owner on Apr 27, 2019. It is now read-only.

Commit 3c5d0ab

Browse files
committed
[PEP8] BasePlugin
1 parent e14ea4a commit 3c5d0ab

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

base_plugin.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
# encoding: utf-8
22

3+
34
class BasePlugin(object):
45
"""
5-
Defines an interface for all plugins to inherit from. Note that the __init__
6-
method should generally not be overrode; all setup work should be done in
7-
activate() if possible. If you do override __init__, remember to super()!
6+
Defines an interface for all plugins to inherit from. Note that the
7+
__init__ method should generally not be overrode; all setup work should be
8+
done in activate() if possible. If you do override __init__, remember to
9+
super()!
810
911
Note that only one instance of each plugin will be instantiated for *all*
1012
connected clients. self.protocol will be changed by the plugin manager to
@@ -20,7 +22,7 @@ class BasePlugin(object):
2022
name = 'Base Plugin'
2123
description = 'The common class for all plugins to inherit from.'
2224
version = '.1'
23-
depends = []
25+
depends = []
2426

2527
def activate(self):
2628
"""
@@ -370,7 +372,9 @@ def after_central_structure_update(self, data):
370372
return True
371373

372374
def __repr__(self):
373-
return '<Plugin instance: %s (version %s)>' % (self.name, self.version)
375+
return '<Plugin instance: {} (version {})>'.format(
376+
self.name, self.version
377+
)
374378

375379

376380
class CommandNameError(Exception):

0 commit comments

Comments
 (0)