Skip to content

Commit

Permalink
Final fix for pylint issue 4118
Browse files Browse the repository at this point in the history
Details:

* Pylint issue pylint-dev/pylint#4118 introduced in
  Pylint 2.7.0 was fixed in Pylint 2.10.0.

  This change accomodates the fix by removing the circumvention of
  disabling warning R801 on py<3.6, 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 <andreas.r.maier@gmx.de>
  • Loading branch information
andy-maier committed Mar 27, 2022
1 parent 7223041 commit d7da740
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
15 changes: 2 additions & 13 deletions Makefile
Expand Up @@ -238,17 +238,6 @@ pylint_rc_file := pylintrc
pylint_todo_opts := --disable=fixme
pylint_no_todo_opts := --enable=fixme

# Disable the similarity checker on pylint <2.10 due to issues #2672, #2673
ifeq ($(python_mn_version),2.7)
pylint_sc_opts := --disable=R801
else
ifeq ($(python_mn_version),3.5)
pylint_sc_opts := --disable=R801
else
pylint_sc_opts :=
endif
endif

# Flake8 config file
flake8_rc_file := .flake8

Expand Down Expand Up @@ -837,8 +826,8 @@ else
@echo "Makefile: Running Pylint"
-$(call RM_FUNC,$@)
pylint --version
pylint $(pylint_sc_opts) $(pylint_no_todo_opts) --rcfile=$(pylint_rc_file) $(py_src_files)
pylint $(pylint_sc_opts) $(pylint_todo_opts) --rcfile=$(pylint_rc_file) $(py_test_files)
pylint $(pylint_no_todo_opts) --rcfile=$(pylint_rc_file) $(py_src_files)
pylint $(pylint_todo_opts) --rcfile=$(pylint_rc_file) $(py_test_files)
echo "done" >$@
@echo "Makefile: Done running Pylint"
endif
Expand Down
2 changes: 1 addition & 1 deletion dev-requirements.txt
Expand Up @@ -77,7 +77,7 @@ 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.7 / astroid 2.5 removed support for py35
# Pylint 2.10.0 / astroid 2.7.2 fixes issues in similarity checker (issues #2672, #2673)
# Pylint 2.7-2.9 had issue https://github.com/PyCQA/pylint/issues/4118 (issues #2672, #2673)
pylint>=1.6.4,<2.0.0; python_version == '2.7'
pylint>=2.5.2; python_version == '3.5'
pylint>=2.10.0; python_version >= '3.6'
Expand Down

0 comments on commit d7da740

Please sign in to comment.