From a250668cb2abeb19908624c4069f6426bb99d4c0 Mon Sep 17 00:00:00 2001 From: Andreas Maier Date: Sun, 27 Mar 2022 09:33:45 +0200 Subject: [PATCH] Final fix for pylint issue 4118 Details: * Pylint issue https://github.com/PyCQA/pylint/issues/4118 introduced in Pylint 2.7.0 was fixed in Pylint 2.10.0. This change accomodates the fix by removing the circumvention of globally disabling warning R801, and by increasing the minimum version of Pylint to 2.10.0 for Python >=3.6. The Pylint version with the issue is not supported on earlier Python versions. No change log entry is needed, since the circumvention was introduced in the same package version. Signed-off-by: Andreas Maier --- dev-requirements.txt | 8 ++++++-- minimum-constraints.txt | 6 ++++-- pylintrc | 6 +----- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/dev-requirements.txt b/dev-requirements.txt index 82231a2..3ab049e 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -79,12 +79,16 @@ Babel>=2.7.0 # Pylint 1.x / astroid 1.x supports py27 and py34/35/36 # Pylint 2.0 / astroid 2.0 removed py27, added py37 # Pylint 2.4 / astroid 2.3 removed py34 +# Pylint 2.7 / astroid 2.5 removed py35 +# Pylint 2.7-2.9 had issue https://github.com/PyCQA/pylint/issues/4118 pylint>=1.6.4,<2.0.0; python_version == '2.7' pylint>=2.2.2,<2.4; python_version == '3.4' -pylint>=2.4.4; python_version >= '3.5' +pylint>=2.4.4; python_version == '3.5' +pylint>=2.10.0; python_version >= '3.6' astroid>=1.4.9,<2.0.0; python_version == '2.7' astroid>=2.1.0,<2.3; python_version == '3.4' -astroid>=2.3.3; python_version >= '3.5' +astroid>=2.3.3; python_version == '3.5' +astroid>=2.7.2; python_version >= '3.6' # typed-ast is used by astroid on py34..py37 # typed-ast 1.4.0 removed support for Python 3.4. typed-ast>=1.3.0,<1.4.0; python_version == '3.4' and implementation_name=='cpython' diff --git a/minimum-constraints.txt b/minimum-constraints.txt index 94c7630..d1591e7 100644 --- a/minimum-constraints.txt +++ b/minimum-constraints.txt @@ -180,10 +180,12 @@ Babel==2.7.0 # PyLint (no imports, invoked via pylint script) - does not support py3: pylint==1.6.4; python_version == '2.7' pylint==2.2.2; python_version == '3.4' -pylint==2.4.4; python_version >= '3.5' +pylint==2.4.4; python_version == '3.5' +pylint==2.10.0; python_version >= '3.6' astroid==1.4.9; python_version == '2.7' astroid==2.1.0; python_version == '3.4' -astroid==2.3.3; python_version >= '3.5' +astroid==2.3.3; python_version == '3.5' +astroid==2.7.2; python_version >= '3.6' # typed-ast is used by astroid on py34..py37 typed-ast==1.3.0; python_version == '3.4' and implementation_name=='cpython' typed-ast==1.4.0; python_version >= '3.5' and python_version < '3.8' and implementation_name=='cpython' diff --git a/pylintrc b/pylintrc index e6b6f05..0ac0379 100644 --- a/pylintrc +++ b/pylintrc @@ -68,11 +68,7 @@ disable=I0011, wildcard-import, unused-wildcard-import, locally-enabled, superfluous-parens, useless-object-inheritance, consider-using-set-comprehension, unnecessary-pass, useless-return, - bad-option-value, redundant-u-string-prefix, consider-using-f-string, - R0801 - -# TODO: R0801 was added due to https://github.com/PyCQA/pylint/issues/4118. -# Remove it again once fixed. + bad-option-value, redundant-u-string-prefix, consider-using-f-string # Note: "useless-object-inheritance" is python 3 only. In Python 2, # "new-style" objects must inherit from object, or else