From 6dce92b1a0598aa0ce9565f035baeca61a249058 Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Thu, 10 Jun 2010 16:56:17 +0100 Subject: [PATCH] Make pylint happier with plugins --- terminatorlib/plugin.py | 2 +- terminatorlib/plugins/custom_commands.py | 4 ++-- terminatorlib/plugins/terminalshot.py | 4 ++-- terminatorlib/plugins/testplugin.py | 4 ++-- terminatorlib/plugins/url_handlers.py | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/terminatorlib/plugin.py b/terminatorlib/plugin.py index 09d41a77..c88460d5 100755 --- a/terminatorlib/plugin.py +++ b/terminatorlib/plugin.py @@ -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: diff --git a/terminatorlib/plugins/custom_commands.py b/terminatorlib/plugins/custom_commands.py index 5fbe31a1..8ae62ef1 100755 --- a/terminatorlib/plugins/custom_commands.py +++ b/terminatorlib/plugins/custom_commands.py @@ -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""" diff --git a/terminatorlib/plugins/terminalshot.py b/terminatorlib/plugins/terminalshot.py index 59692a6b..ac0f1bba 100755 --- a/terminatorlib/plugins/terminalshot.py +++ b/terminatorlib/plugins/terminalshot.py @@ -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""" diff --git a/terminatorlib/plugins/testplugin.py b/terminatorlib/plugins/testplugin.py index a6bd84c3..e18ed60c 100644 --- a/terminatorlib/plugins/testplugin.py +++ b/terminatorlib/plugins/testplugin.py @@ -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'] diff --git a/terminatorlib/plugins/url_handlers.py b/terminatorlib/plugins/url_handlers.py index edea9457..04524749 100644 --- a/terminatorlib/plugins/url_handlers.py +++ b/terminatorlib/plugins/url_handlers.py @@ -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