You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by ma...@apache.org on 2018/08/21 15:31:53 UTC

[incubator-mxnet] branch master updated: [MXNET-696] 'make pylint' should run a current version of PyLint (#12200)

This is an automated email from the ASF dual-hosted git repository.

marcoabreu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git


The following commit(s) were added to refs/heads/master by this push:
     new 09ee17c  [MXNET-696] 'make pylint' should run a current version of PyLint (#12200)
09ee17c is described below

commit 09ee17c7c2e06cfd416c2528d867427ae506e853
Author: cclauss <cc...@bluewin.ch>
AuthorDate: Tue Aug 21 17:31:42 2018 +0200

    [MXNET-696] 'make pylint' should run a current version of PyLint (#12200)
    
    * make pylint should run pylint under both Python 2 and Python 3
    
    @vandanavk
    
    * Python 3 first and Python 2 second
    
    * Update Makefile
    
    * pythonX -m pylint --version
    
    * pythonX -m pip install --upgrade pylint
    
    * make likes tabs while Python likes spaces ;-)
    
    * pythonX -m pip install --upgrade --user pylint
    
    * Comments: pylint v1.8.3 --> v2.1.1 on Python 2.7.12 or 3.5.2
    
    * pylintrc: Add --disable=useless-object-inheritance
    
    * pylint --disable= ten new tests
    
    * max-line-length=100 --> 120
    
    * Disable 4 more tests for Python 2
    
    * Remove temporary lines: pip install --upgrade pylint
    
    * Add undefined-variable to PyLint enable list
    
    Power on!
    
    * Remove undefined-variable from enabled
    
    * Re-remove the undefined-variable test
    
    * Revert changes to Makefile
    
    * Remove Python 2 related test change from pylintrc
    
    * Force a retest
    
    * Fix conflict
    
    * Re-resolve the conflict
    
    * Force a retest because of Onnx troubles
    
    * Remove PyLint disable directive "consider-using-in"
    
    #12214 has landed which fixes all instances of "consider-using-in"
---
 ci/docker/install/ubuntu_python.sh |  4 ++--
 ci/other/pylintrc                  | 45 +++++++++++++++++++++++++++++++++++---
 2 files changed, 44 insertions(+), 5 deletions(-)

diff --git a/ci/docker/install/ubuntu_python.sh b/ci/docker/install/ubuntu_python.sh
index e71cac8..0fd91cb 100755
--- a/ci/docker/install/ubuntu_python.sh
+++ b/ci/docker/install/ubuntu_python.sh
@@ -29,5 +29,5 @@ wget -nv https://bootstrap.pypa.io/get-pip.py
 python3 get-pip.py
 python2 get-pip.py
 
-pip2 install nose cpplint==1.3.0 pylint==1.8.3 'numpy<1.15.0,>=1.8.2' nose-timer 'requests<2.19.0,>=2.18.4' h5py==2.8.0rc1 scipy==1.0.1 boto3
-pip3 install nose cpplint==1.3.0 pylint==1.8.3 'numpy<1.15.0,>=1.8.2' nose-timer 'requests<2.19.0,>=2.18.4' h5py==2.8.0rc1 scipy==1.0.1 boto3
+pip2 install nose cpplint==1.3.0 pylint==1.9.3 'numpy<1.15.0,>=1.8.2' nose-timer 'requests<2.19.0,>=2.18.4' h5py==2.8.0rc1 scipy==1.0.1 boto3
+pip3 install nose cpplint==1.3.0 pylint==2.1.1 'numpy<1.15.0,>=1.8.2' nose-timer 'requests<2.19.0,>=2.18.4' h5py==2.8.0rc1 scipy==1.0.1 boto3
diff --git a/ci/other/pylintrc b/ci/other/pylintrc
index 0828505..ca31417 100644
--- a/ci/other/pylintrc
+++ b/ci/other/pylintrc
@@ -71,7 +71,7 @@ confidence=
 # either give multiple identifier separated by comma (,) or put this option
 # multiple time (only on the command line, not in the configuration file where
 # it should appear only once). See also the "--disable" option for examples.
-enable=indexing-exception,old-raise-syntax
+enable=indexing-exception,old-raise-syntax,undefined-variable
 
 # Disable the message, report, category or checker with the given id(s). You
 # can either give multiple identifiers separated by comma (,) or put this
@@ -82,7 +82,46 @@ enable=indexing-exception,old-raise-syntax
 # --enable=similarities". If you want to run only the classes checker, but have
 # no Warning level messages displayed, use"--disable=all --enable=classes
 # --disable=W"
-disable=design,similarities,no-self-use,attribute-defined-outside-init,locally-disabled,star-args,pointless-except,bad-option-value,global-statement,fixme,suppressed-message,useless-suppression,locally-enabled,no-member,no-name-in-module,import-error,unsubscriptable-object,unbalanced-tuple-unpacking,undefined-variable,protected-access,superfluous-parens,invalid-name,no-else-return,useless-super-delegation,len-as-condition,invalid-unary-operand-type
+disable=
+    design,
+    similarities,
+    no-self-use,
+    attribute-defined-outside-init,
+    locally-disabled,
+    star-args,
+    pointless-except,
+    bad-option-value,
+    global-statement,
+    fixme,
+    suppressed-message,
+    useless-suppression,
+    locally-enabled,
+    no-member,
+    no-name-in-module,
+    import-error,
+    unsubscriptable-object,
+    unbalanced-tuple-unpacking,
+    undefined-variable,
+    protected-access,
+    superfluous-parens,
+    invalid-name,
+    no-else-return,
+    useless-super-delegation,
+    len-as-condition,
+    invalid-unary-operand-type,
+    chained-comparison,
+    consider-using-dict-comprehension,
+    consider-using-set-comprehension,
+    invalid-envvar-default,
+    singleton-comparison,
+    try-except-raise,
+    useless-object-inheritance,
+    useless-return,
+    c-extension-no-member,
+    deprecated-lambda,
+    redefined-builtin,
+    unexpected-keyword-arg
+
 # 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-buil [...]
 
 
@@ -117,7 +156,7 @@ evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / stateme
 [FORMAT]
 
 # Maximum number of characters on a single line.
-max-line-length=100
+max-line-length=120
 
 # Regexp for a line that is allowed to be longer than the limit.
 ignore-long-lines=^\s*(# )?<?https?://\S+>?$