diff options
author | toonn <toonn@toonn.io> | 2020-06-28 22:24:19 +0200 |
---|---|---|
committer | toonn <toonn@toonn.io> | 2020-07-05 15:23:45 +0200 |
commit | 6a871101331b9b6ea19958946cfd4f5845505d38 (patch) | |
tree | a3ac9bacf3c276c614042f9a740a5c612b79e638 /.pylintrc | |
parent | d68f37c88fc7891562d8f509f53854ebd86c56fc (diff) | |
download | ranger-6a871101331b9b6ea19958946cfd4f5845505d38.tar.gz |
Implement python 2 compatibility checks
We have been stuck on pylint <2 for a long time now because it dropped some of the python 2 lints we rely on. We maintain compatibility with python 2.6+ and 3.5+ and a lack of lints makes especially the former much harder. Incompatibilities had already snuck in in the form of implicit format specs. By implementing a custom checker we can make sure this doesn't happen again.
Diffstat (limited to '.pylintrc')
-rw-r--r-- | .pylintrc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/.pylintrc b/.pylintrc index b42432ca..3fdcbaa8 100644 --- a/.pylintrc +++ b/.pylintrc @@ -1,3 +1,7 @@ +[MASTER] +init-hook='import sys; sys.path.append("tests/pylint")' +load-plugins=py2_compat + [BASIC] good-names=i,j,k,n,x,y,ex,Run,_,fm,ui,fg,bg bad-names=foo,baz,toto,tutu,tata @@ -8,6 +12,7 @@ max-branches=16 [FORMAT] max-line-length = 99 +enable=no-absolute-import,old-division disable=cyclic-import,duplicate-code,fixme,import-outside-toplevel,locally-disabled,locally-enabled,missing-docstring,no-else-break,no-else-continue,no-else-raise,no-else-return,redefined-variable-type,stop-iteration-return,useless-object-inheritance [TYPECHECK] |