diff options
author | Jan Safranek <jsafrane@redhat.com> | 2013-01-23 13:58:37 +0100 |
---|---|---|
committer | Jan Safranek <jsafrane@redhat.com> | 2013-01-23 14:13:46 +0100 |
commit | 38610ace6f9e0f268acf7417cc94f3e49d471fcf (patch) | |
tree | b34cd21e9b501621fd13df7055e93bbfc2eca334 | |
parent | 5422c49f7f1d99263c5fa522774b6a5fd33bd528 (diff) | |
download | openlmi-providers-38610ace6f9e0f268acf7417cc94f3e49d471fcf.tar.gz openlmi-providers-38610ace6f9e0f268acf7417cc94f3e49d471fcf.tar.xz openlmi-providers-38610ace6f9e0f268acf7417cc94f3e49d471fcf.zip |
Ignore 'W0613: unused argument' in entry methods from CIMOM.
-rw-r--r-- | tools/pylint/plugins/cim_provider_checker.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/pylint/plugins/cim_provider_checker.py b/tools/pylint/plugins/cim_provider_checker.py index f46e173..b6a00c1 100644 --- a/tools/pylint/plugins/cim_provider_checker.py +++ b/tools/pylint/plugins/cim_provider_checker.py @@ -55,6 +55,18 @@ def supress_cim_provider_messages(linter, node): linter.disable('R0903', scope='module', line=child.lineno) linter.disable('C0111', scope='module', line=child.lineno) + generated_methods = ( + 'get_instance', + 'enum_instances', + 'set_instance', + 'delete_instance') + # implementation of generated methods may not use all arguments + for child in node.get_children(): + if (child.name in generated_methods + or child.name.startswith('cim_method_')): + linter.disable('W0613', scope='module', + line=child.lineno) + class CIMProviderChecker(BaseChecker): """ Checks for compliance to naming conventions for python cim providers. |