diff options
author | Jan Safranek <jsafrane@redhat.com> | 2013-02-20 10:19:41 +0100 |
---|---|---|
committer | Jan Safranek <jsafrane@redhat.com> | 2013-02-20 10:19:41 +0100 |
commit | d36e654c064cdef4bc9032010809870c21f3c6d7 (patch) | |
tree | de64f11178d153622eb69eff3c7a3fef7ea41bc8 /tools/pylint | |
parent | fb93e3a7ca64a56b29b7d67e92fb9c05a07eb6a0 (diff) | |
parent | 72f6010fc7dd68ea2ecd9431f906d077a7c20181 (diff) | |
download | openlmi-providers-d36e654c064cdef4bc9032010809870c21f3c6d7.tar.gz openlmi-providers-d36e654c064cdef4bc9032010809870c21f3c6d7.tar.xz openlmi-providers-d36e654c064cdef4bc9032010809870c21f3c6d7.zip |
Merge branch 'master' of ssh://git.fedorahosted.org/git/openlmi-providers
Diffstat (limited to 'tools/pylint')
-rw-r--r-- | tools/pylint/plugins/cim_provider_checker.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/tools/pylint/plugins/cim_provider_checker.py b/tools/pylint/plugins/cim_provider_checker.py index 8ce775b..b1b1ae9 100644 --- a/tools/pylint/plugins/cim_provider_checker.py +++ b/tools/pylint/plugins/cim_provider_checker.py @@ -46,9 +46,9 @@ def recursively_clean_cls_values(linter, node): Supress them for any nested class recursively. """ # class has too few public methods - linter.disable('R0903', scope='module', line=node.lineno) + linter.disable('R0903', scope='module', line=node.fromlineno) # class has not docstring - linter.disable('C0111', scope='module', line=node.lineno) + linter.disable('C0111', scope='module', line=node.fromlineno) for child in node.get_children(): if isinstance(child, scoped_nodes.Class): recursively_clean_cls_values(linter, child) @@ -60,10 +60,10 @@ def supress_cim_provider_messages(linter, node): """ assert isinstance(node, scoped_nodes.Class) # class has too many public methods - linter.disable('R0904', scope='module', line=node.lineno) + linter.disable('R0904', scope='module', line=node.fromlineno) if '__init__' in node: # __init__ not called for base class - linter.disable('W0231', scope='module', line=node['__init__'].lineno) + linter.disable('W0231', scope='module', line=node['__init__'].fromlineno) if ( 'Values' in node and isinstance(node['Values'], scoped_nodes.Class)): recursively_clean_cls_values(linter, node['Values']) @@ -79,9 +79,10 @@ def supress_cim_provider_messages(linter, node): or ( child.name not in generated_methods and not child.name.startswith('cim_method_'))): continue - linter.disable('R0201', scope='module', line=node.lineno) + # provider method could be a function + linter.disable('R0201', scope='module', line=child.fromlineno) for arg in child.args.get_children(): - linter.disable('W0613', scope='module', line=arg.lineno) + linter.disable('W0613', scope='module', line=arg.fromlineno) class CIMProviderChecker(BaseChecker): """ |