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) plugin)
try: try:
module = __import__(plugin[:-3], None, None, ['']) 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']: if not testing and item in config['disabled_plugins']:
continue continue
if item not in self.instances: 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) (CC_COL_ENABLED, CC_COL_NAME, CC_COL_COMMAND) = range(0,3)
# Every plugin you want Terminator to load *must* be listed in 'available' # Every plugin you want Terminator to load *must* be listed in 'AVAILABLE'
available = ['CustomCommandsMenu'] AVAILABLE = ['CustomCommandsMenu']
class CustomCommandsMenu(plugin.MenuItem): class CustomCommandsMenu(plugin.MenuItem):
"""Add custom commands to the terminal menu""" """Add custom commands to the terminal menu"""

View File

@ -10,8 +10,8 @@ import terminatorlib.plugin as plugin
from terminatorlib.translation import _ from terminatorlib.translation import _
from terminatorlib.util import widget_pixbuf from terminatorlib.util import widget_pixbuf
# Every plugin you want Terminator to load *must* be listed in 'available' # Every plugin you want Terminator to load *must* be listed in 'AVAILABLE'
available = ['TerminalShot'] AVAILABLE = ['TerminalShot']
class TerminalShot(plugin.MenuItem): class TerminalShot(plugin.MenuItem):
"""Add custom commands to the terminal menu""" """Add custom commands to the terminal menu"""

View File

@ -1,7 +1,7 @@
import terminatorlib.plugin as plugin import terminatorlib.plugin as plugin
# available must contain a list of all the classes that you want exposed # AVAILABLE must contain a list of all the classes that you want exposed
available = ['TestPlugin'] AVAILABLE = ['TestPlugin']
class TestPlugin(plugin.Plugin): class TestPlugin(plugin.Plugin):
capabilities = ['test'] capabilities = ['test']

View File

@ -4,8 +4,8 @@
import re import re
import terminatorlib.plugin as plugin import terminatorlib.plugin as plugin
# Every plugin you want Terminator to load *must* be listed in 'available' # Every plugin you want Terminator to load *must* be listed in 'AVAILABLE'
available = ['LaunchpadBugURLHandler', 'LaunchpadCodeURLHandler', 'APTURLHandler'] AVAILABLE = ['LaunchpadBugURLHandler', 'LaunchpadCodeURLHandler', 'APTURLHandler']
class LaunchpadBugURLHandler(plugin.URLHandler): class LaunchpadBugURLHandler(plugin.URLHandler):
"""Launchpad Bug URL handler. If the URL looks like a Launchpad changelog """Launchpad Bug URL handler. If the URL looks like a Launchpad changelog