diff --git a/ci/other/pylintrc b/ci/other/pylintrc index 841a3bea13fa..a1034cd50f9c 100644 --- a/ci/other/pylintrc +++ b/ci/other/pylintrc @@ -40,7 +40,7 @@ persistent=yes load-plugins= # Use multiple processes to speed up Pylint. -jobs=8 +jobs=1 # Allow loading of arbitrary C extensions. Extensions are imported into the # active Python interpreter and may run arbitrary code. @@ -113,7 +113,10 @@ disable= too-many-instance-attributes, too-many-locals, too-many-public-methods, - too-many-statements + too-many-statements, + too-many-lines, + duplicate-code, + cyclic-import # disable=unicode-builtin,delslice-method,using-cmp-argument,setslice-method,dict-view-method,parameter-unpacking,range-builtin-not-iterating,print-statement,file-builtin,old-raise-syntax,basestring-builtin,execfile-builtin,indexing-exception,import-star-module-level,coerce-method,long-builtin,old-ne-operator,old-division,no-absolute-import,raw_input-builtin,old-octal-literal,oct-method,xrange-builtin,hex-method,unpacking-in-except,nonzero-method,raising-string,intern-builtin,reload-builtin,metaclass-assignment,cmp-method,filter-builtin-not-iterating,apply-builtin,map-builtin-not-iterating,next-method-called,unichr-builtin,buffer-builtin,dict-iter-method,input-builtin,coerce-builtin,getslice-method,useless-suppression,standarderror-builtin,zip-builtin-not-iterating,suppressed-message,cmp-builtin,backtick,long-suffix,reduce-builtin,round-builtin diff --git a/python/mxnet/numpy_op_signature.py b/python/mxnet/numpy_op_signature.py index 314de302109d..3e8b6d578537 100644 --- a/python/mxnet/numpy_op_signature.py +++ b/python/mxnet/numpy_op_signature.py @@ -19,6 +19,7 @@ import sys import warnings +import inspect from . import _numpy_op_doc from . import numpy as mx_np from . import numpy_extension as mx_npx @@ -38,13 +39,12 @@ def _get_builtin_op(op_name): return None submodule_name = _get_op_submodule_name(op_name, op_name_prefix, submodule_name_list) + op_module = root_module if len(submodule_name) > 0: op_module = getattr(root_module, submodule_name[1:-1], None) if op_module is None: raise ValueError('Cannot find submodule {} in module {}' .format(submodule_name[1:-1], root_module.__name__)) - else: - op_module = root_module op = getattr(op_module, op_name[(len(op_name_prefix)+len(submodule_name)):], None) if op is None: @@ -61,7 +61,6 @@ def _register_op_signatures(): .format(str(sys.version))) return - import inspect for op_name in dir(_numpy_op_doc): op = _get_builtin_op(op_name) if op is not None: