Make pylint happier with plugins

This commit is contained in:
Chris Jones 2010-06-10 16:56:17 +01:00
parent ff9763cf2b
commit 6dce92b1a0
5 changed files with 9 additions and 9 deletions

View File

@ -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:

View File

@ -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"""

View File

@ -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"""

View File

@ -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']

View File

@ -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