diff options
author | Jan Safranek <jsafrane@redhat.com> | 2013-01-24 14:49:02 +0100 |
---|---|---|
committer | Jan Safranek <jsafrane@redhat.com> | 2013-01-24 14:49:02 +0100 |
commit | f89342d2153cb66122508c9b3d209b83442d73e8 (patch) | |
tree | 78e607ab3e862b5505b485857fc1fecf48730a77 | |
parent | 1ed6155f6f5d30dc44fa7a0ae6b88553b0a55992 (diff) | |
parent | b2044c554f4343abaa31f843fdc6b8a445cbff96 (diff) | |
download | openlmi-providers-f89342d2153cb66122508c9b3d209b83442d73e8.tar.gz openlmi-providers-f89342d2153cb66122508c9b3d209b83442d73e8.tar.xz openlmi-providers-f89342d2153cb66122508c9b3d209b83442d73e8.zip |
Merge branch 'master' of ssh://git.fedorahosted.org/git/openlmi-providers
-rw-r--r-- | tools/pylint/plugins/cim_provider_checker.py | 10 | ||||
-rw-r--r-- | tools/pylint/pylintrc | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/tools/pylint/plugins/cim_provider_checker.py b/tools/pylint/plugins/cim_provider_checker.py index 6dd09db..cf4e229 100644 --- a/tools/pylint/plugins/cim_provider_checker.py +++ b/tools/pylint/plugins/cim_provider_checker.py @@ -75,12 +75,12 @@ def supress_cim_provider_messages(linter, node): 'delete_instance') # implementation of generated methods may not use all arguments for child in node.get_children(): - if not isinstance(child, scoped_nodes.Function): + if ( not isinstance(child, scoped_nodes.Function) + or ( child.name not in generated_methods + and not child.name.startswith('cim_method_'))): continue - if (child.name in generated_methods - or child.name.startswith('cim_method_')): - linter.disable('W0613', scope='module', - line=child.lineno) + for arg in child.args.get_children(): + linter.disable('W0613', scope='module', line=arg.lineno) class CIMProviderChecker(BaseChecker): """ diff --git a/tools/pylint/pylintrc b/tools/pylint/pylintrc index 28749cd..7ac3f78 100644 --- a/tools/pylint/pylintrc +++ b/tools/pylint/pylintrc @@ -131,7 +131,7 @@ method-rgx=[a-z_][a-z0-9_]{2,49}$ attr-rgx=[a-z_][a-z0-9_]{2,30}$ # Regular expression which should only match correct argument names -argument-rgx=[a-z_][a-z0-9_]{2,30}$ +argument-rgx=[a-z_][a-z0-9_]{1,30}$ # Regular expression which should only match correct variable names variable-rgx=[a-z_][a-z0-9_]{1,30}$ |