Make pylint happier with plugins
This commit is contained in:
parent
ff9763cf2b
commit
6dce92b1a0
|
@ -84,7 +84,7 @@ class PluginRegistry(borg.Borg):
|
|||
plugin)
|
||||
try:
|
||||
module = __import__(plugin[:-3], None, None, [''])
|
||||
for item in getattr(module, 'available'):
|
||||
for item in getattr(module, 'AVAILABLE'):
|
||||
if not testing and item in config['disabled_plugins']:
|
||||
continue
|
||||
if item not in self.instances:
|
||||
|
|
|
@ -17,8 +17,8 @@ from terminatorlib.util import get_config_dir
|
|||
|
||||
(CC_COL_ENABLED, CC_COL_NAME, CC_COL_COMMAND) = range(0,3)
|
||||
|
||||
# Every plugin you want Terminator to load *must* be listed in 'available'
|
||||
available = ['CustomCommandsMenu']
|
||||
# Every plugin you want Terminator to load *must* be listed in 'AVAILABLE'
|
||||
AVAILABLE = ['CustomCommandsMenu']
|
||||
|
||||
class CustomCommandsMenu(plugin.MenuItem):
|
||||
"""Add custom commands to the terminal menu"""
|
||||
|
|
|
@ -10,8 +10,8 @@ import terminatorlib.plugin as plugin
|
|||
from terminatorlib.translation import _
|
||||
from terminatorlib.util import widget_pixbuf
|
||||
|
||||
# Every plugin you want Terminator to load *must* be listed in 'available'
|
||||
available = ['TerminalShot']
|
||||
# Every plugin you want Terminator to load *must* be listed in 'AVAILABLE'
|
||||
AVAILABLE = ['TerminalShot']
|
||||
|
||||
class TerminalShot(plugin.MenuItem):
|
||||
"""Add custom commands to the terminal menu"""
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import terminatorlib.plugin as plugin
|
||||
|
||||
# available must contain a list of all the classes that you want exposed
|
||||
available = ['TestPlugin']
|
||||
# AVAILABLE must contain a list of all the classes that you want exposed
|
||||
AVAILABLE = ['TestPlugin']
|
||||
|
||||
class TestPlugin(plugin.Plugin):
|
||||
capabilities = ['test']
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
import re
|
||||
import terminatorlib.plugin as plugin
|
||||
|
||||
# Every plugin you want Terminator to load *must* be listed in 'available'
|
||||
available = ['LaunchpadBugURLHandler', 'LaunchpadCodeURLHandler', 'APTURLHandler']
|
||||
# Every plugin you want Terminator to load *must* be listed in 'AVAILABLE'
|
||||
AVAILABLE = ['LaunchpadBugURLHandler', 'LaunchpadCodeURLHandler', 'APTURLHandler']
|
||||
|
||||
class LaunchpadBugURLHandler(plugin.URLHandler):
|
||||
"""Launchpad Bug URL handler. If the URL looks like a Launchpad changelog
|
||||
|
|
Loading…
Reference in New Issue