diff options
-rw-r--r-- | src/python/openlmi/__init__.pyc | bin | 246 -> 0 bytes | |||
-rw-r--r-- | tools/pylint/plugins/cim_provider_checker.py | 13 |
2 files changed, 7 insertions, 6 deletions
diff --git a/src/python/openlmi/__init__.pyc b/src/python/openlmi/__init__.pyc Binary files differdeleted file mode 100644 index d7131d7..0000000 --- a/src/python/openlmi/__init__.pyc +++ /dev/null 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): """ |