summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorJan Safranek <jsafrane@redhat.com>2013-01-23 13:58:37 +0100
committerJan Safranek <jsafrane@redhat.com>2013-01-23 14:13:46 +0100
commit38610ace6f9e0f268acf7417cc94f3e49d471fcf (patch)
treeb34cd21e9b501621fd13df7055e93bbfc2eca334 /tools
parent5422c49f7f1d99263c5fa522774b6a5fd33bd528 (diff)
downloadopenlmi-providers-38610ace6f9e0f268acf7417cc94f3e49d471fcf.tar.gz
openlmi-providers-38610ace6f9e0f268acf7417cc94f3e49d471fcf.tar.xz
openlmi-providers-38610ace6f9e0f268acf7417cc94f3e49d471fcf.zip
Ignore 'W0613: unused argument' in entry methods from CIMOM.
Diffstat (limited to 'tools')
-rw-r--r--tools/pylint/plugins/cim_provider_checker.py12
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.