Skip to content

Commit

Permalink
Bump pylint to 2.12.0, update changelog
Browse files Browse the repository at this point in the history
Closes #5250
  • Loading branch information
Pierre-Sassoulas committed Nov 25, 2021
1 parent f84c069 commit f6d3d39
Show file tree
Hide file tree
Showing 59 changed files with 171 additions and 48 deletions.
32 changes: 22 additions & 10 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,34 @@
Pylint's ChangeLog
------------------

What's New in Pylint 2.13.0?
============================
Release date: TBA

..
Put new features here and also in 'doc/whatsnew/2.13.rst'


What's New in Pylint 2.12.0?
..
Insert your changelog randomly, it will reduce merge conflicts
(Ie. not necessarilly at the end)


What's New in Pylint 2.12.1?
============================
Release date: TBA

..
Put new features here and also in 'doc/whatsnew/2.12.rst'
Put bug fixes that should not wait for a new minor version here

..
Insert your changelog randomly, it will reduce merge conflicts
(Ie. not necessarilly at the end)


What's New in Pylint 2.12.0?
============================
Release date: 2021-11-24

* Upgrade astroid to 2.9.0

Expand Down Expand Up @@ -230,14 +250,6 @@ Release date: TBA

* Inheriting from a class that implements ``__class_getitem__`` no longer raises ``inherit-non-class``.


What's New in Pylint 2.11.2?
============================
Release date: TBA

..
Put bug fixes that should not wait for a new minor version here

* Pyreverse - Add the project root directory to sys.path

Closes #2479
Expand Down
44 changes: 29 additions & 15 deletions doc/whatsnew/2.12.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,31 @@
***************************

:Release: 2.12
:Date: TBA
:Date: 2021-11-24

Summary -- Release highlights
=============================

In 2.12, we introduced a new option ``py-version`` that permits to analyse code for a python
version that may differ from your current python interpreter. This does not affect all checkers but
permits, for example, to check for python 3.5 code smells (using f-string's) while using pylint with python 3.6.
The minimum version to run pylint is now 3.6.2, while the last working version for python 3.6.0
and 3.6.1 was pylint 2.9.3.

On top of fixing a lot of false positives and bugs, we also added new default checks, like
``use-implicit-booleaness-not-comparison``, ``overridden-final-method``, and ``useless-with-lock``.
There's also better check for TOML configurations.

Lastly, in addition to the information we already had about start line and start column,
we introduced new information about the end line and end column of messages. This
will permit to have more precise visual clue in IDE like in pylint for vs-code. The default
will stay the same to not break compatibility but it can be retrieved by adding ``end_line``
and ``end_column`` to the ``--msg-template`` option. For better result stick to python 3.8+.

The checker for Yoda conditions is now an extension, you might want to enable it if you were
relying on this check. There's also a new extension checker, ``consider-using-any-or-all`` that
detects for loops that could be replaced by any or all, entirely contributed by @areveny,
welcome to the team !

New checkers
============
Expand All @@ -33,11 +53,6 @@ New checkers
* Added ``using-f-string-in-unsupported-version`` checker. Issued when ``py-version``
is set to a version that does not support f-strings (< 3.6)

* Fix ``useless-super-delegation`` false positive when default keyword argument is a variable.

* Added new checker ``use-implicit-booleanness``: Emitted when using collection
literals for boolean comparisons

* Added new checker ``use-implicit-booleaness-not-comparison``: Emitted when
collection literal comparison is being used to check for emptiness.

Expand All @@ -46,11 +61,6 @@ New checkers
* Added ``using-final-decorator-in-unsupported-version`` checker. Issued when ``py-version``
is set to a version that does not support typing.final (< 3.8)

* Added configuration option ``exclude-too-few-public-methods`` to allow excluding
classes from the ``min-public-methods`` checker.

Closes #3370

* Added new checker ``useless-with-lock`` to find incorrect usage of with statement and threading module locks.
Emitted when ``with threading.Lock():`` is used instead of ``with lock_instance:``.

Expand All @@ -69,12 +79,9 @@ New checkers
* ``add_message`` of the unittest ``testutil`` now actually handles the ``col_offset`` parameter
and allows it to be checked against actual output in a test.

Removed checkers
================


Extensions
==========

* Added an optional extension ``consider-using-any-or-all``: Emitted when a ``for`` loop only
produces a boolean and could be replaced by ``any`` or ``all`` using a generator. Also suggests
a suitable any/all statement if it is concise.
Expand All @@ -96,6 +103,11 @@ Other Changes

Closes #5178

* Added configuration option ``exclude-too-few-public-methods`` to allow excluding
classes from the ``min-public-methods`` checker.

Closes #3370

* Fix ``accept-no-yields-doc`` and ``accept-no-return-doc`` not allowing missing ``yield`` or
``return`` documentation when a docstring is partially correct

Expand Down Expand Up @@ -199,6 +211,8 @@ Other Changes

* Fix crash for ``protected-access`` on (outer) class traversal

* Fix ``useless-super-delegation`` false positive when default keyword argument is a variable.

* Make yn validator case insensitive, to allow for ``True`` and ``False`` in config files.

* The last version compatible with python '3.6.0' and '3.6.1' is pylint '2.9.3'. We did not
Expand Down
21 changes: 21 additions & 0 deletions doc/whatsnew/2.13.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
***************************
What's New in Pylint 2.13
***************************

:Release: 2.13
:Date: TBA

Summary -- Release highlights
=============================

New checkers
============

Removed checkers
================

Extensions
==========

Other Changes
=============
1 change: 1 addition & 0 deletions doc/whatsnew/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ High level descriptions of the most important changes between major Pylint versi
.. toctree::
:maxdepth: 1

2.13.rst
2.12.rst
2.11.rst
2.10.rst
Expand Down
2 changes: 1 addition & 1 deletion pylint/__pkginfo__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# For details: https://github.com/PyCQA/pylint/blob/main/LICENSE
from typing import Tuple

__version__ = "2.11.2-dev0"
__version__ = "2.12.0"


def get_numversion_from_version(v: str) -> Tuple:
Expand Down
7 changes: 6 additions & 1 deletion pylint/checkers/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
# Copyright (c) 2017 Jacques Kvam <[email protected]>
# Copyright (c) 2017 ttenhoeve-aa <[email protected]>
# Copyright (c) 2018-2019, 2021 Nick Drozd <[email protected]>
# Copyright (c) 2018-2019 Ville Skyttä <[email protected]>
# Copyright (c) 2018-2019, 2021 Ville Skyttä <[email protected]>
# Copyright (c) 2018 Sergei Lebedev <[email protected]>
# Copyright (c) 2018 Lucas Cimon <[email protected]>
# Copyright (c) 2018 ssolanki <[email protected]>
Expand Down Expand Up @@ -53,7 +53,12 @@
# Copyright (c) 2020 Benny <[email protected]>
# Copyright (c) 2020 Anubhav <[email protected]>
# Copyright (c) 2021 Daniël van Noord <[email protected]>
# Copyright (c) 2021 Tushar Sadhwani <[email protected]>
# Copyright (c) 2021 Tim Martin <[email protected]>
# Copyright (c) 2021 Jaehoon Hwang <[email protected]>
# Copyright (c) 2021 jaydesl <[email protected]>
# Copyright (c) 2021 Marc Mueller <[email protected]>
# Copyright (c) 2021 bot <[email protected]>
# Copyright (c) 2021 Yilei "Dolee" Yang <[email protected]>
# Copyright (c) 2021 Lorena B <[email protected]>
# Copyright (c) 2021 David Liu <[email protected]>
Expand Down
1 change: 1 addition & 0 deletions pylint/checkers/base_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# Copyright (c) 2019 Bruno P. Kinoshita <[email protected]>
# Copyright (c) 2020 hippo91 <[email protected]>
# Copyright (c) 2021 Daniël van Noord <[email protected]>
# Copyright (c) 2021 bot <[email protected]>
# Copyright (c) 2021 Marc Mueller <[email protected]>

# Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
Expand Down
8 changes: 6 additions & 2 deletions pylint/checkers/classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
# Copyright (c) 2016 Moises Lopez <[email protected]>
# Copyright (c) 2016 Jakub Wilk <[email protected]>
# Copyright (c) 2017, 2019-2020 hippo91 <[email protected]>
# Copyright (c) 2018, 2021 Ville Skyttä <[email protected]>
# Copyright (c) 2018, 2020 Anthony Sottile <[email protected]>
# Copyright (c) 2018-2019 Nick Drozd <[email protected]>
# Copyright (c) 2018-2019 Ashley Whetter <[email protected]>
# Copyright (c) 2018 Lucas Cimon <[email protected]>
# Copyright (c) 2018 Bryce Guinta <[email protected]>
# Copyright (c) 2018 ssolanki <[email protected]>
# Copyright (c) 2018 Ben Green <[email protected]>
# Copyright (c) 2018 Ville Skyttä <[email protected]>
# Copyright (c) 2019-2021 Pierre Sassoulas <[email protected]>
# Copyright (c) 2019 mattlbeck <[email protected]>
# Copyright (c) 2019-2020 craig-sh <[email protected]>
Expand All @@ -34,10 +34,14 @@
# Copyright (c) 2019 Pascal Corpet <[email protected]>
# Copyright (c) 2020 GergelyKalmar <[email protected]>
# Copyright (c) 2021 Daniël van Noord <[email protected]>
# Copyright (c) 2021 Marc Mueller <[email protected]>
# Copyright (c) 2021 Mark Byrne <[email protected]>
# Copyright (c) 2021 Samuel Freilich <[email protected]>
# Copyright (c) 2021 Nick Pesce <[email protected]>
# Copyright (c) 2021 bot <[email protected]>
# Copyright (c) 2021 yushao2 <[email protected]>
# Copyright (c) 2021 SupImDos <[email protected]>
# Copyright (c) 2021 Kayran Schmidt <[email protected]>
# Copyright (c) 2021 Marc Mueller <[email protected]>
# Copyright (c) 2021 Yu Shao, Pang <[email protected]>
# Copyright (c) 2021 Konstantina Saketou <[email protected]>
# Copyright (c) 2021 James Sinclair <[email protected]>
Expand Down
4 changes: 4 additions & 0 deletions pylint/checkers/design_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@
# Copyright (c) 2019 Michael Scott Cuthbert <[email protected]>
# Copyright (c) 2020 hippo91 <[email protected]>
# Copyright (c) 2020 Anthony Sottile <[email protected]>
# Copyright (c) 2021 Mike Fiedler <[email protected]>
# Copyright (c) 2021 Youngsoo Sung <[email protected]>
# Copyright (c) 2021 Daniël van Noord <[email protected]>
# Copyright (c) 2021 bot <[email protected]>
# Copyright (c) 2021 Andrew Haigh <[email protected]>
# Copyright (c) 2021 Melvin <[email protected]>
# Copyright (c) 2021 Rebecca Turner <[email protected]>
# Copyright (c) 2021 Marc Mueller <[email protected]>
Expand Down
1 change: 1 addition & 0 deletions pylint/checkers/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
# Copyright (c) 2020 Ram Rachum <[email protected]>
# Copyright (c) 2020 Anthony Sottile <[email protected]>
# Copyright (c) 2021 Daniël van Noord <[email protected]>
# Copyright (c) 2021 Nick Drozd <[email protected]>
# Copyright (c) 2021 Marc Mueller <[email protected]>

# Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
Expand Down
3 changes: 3 additions & 0 deletions pylint/checkers/format.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@
# Copyright (c) 2019 Hugo van Kemenade <[email protected]>
# Copyright (c) 2020 Raphael Gaschignard <[email protected]>
# Copyright (c) 2021 Daniël van Noord <[email protected]>
# Copyright (c) 2021 Tushar Sadhwani <[email protected]>
# Copyright (c) 2021 bot <[email protected]>
# Copyright (c) 2021 Ville Skyttä <[email protected]>
# Copyright (c) 2021 Marc Mueller <[email protected]>

# Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
Expand Down
1 change: 1 addition & 0 deletions pylint/checkers/imports.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
# Copyright (c) 2020 Peter Kolbus <[email protected]>
# Copyright (c) 2020 Damien Baty <[email protected]>
# Copyright (c) 2020 Anthony Sottile <[email protected]>
# Copyright (c) 2021 Tushar Sadhwani <[email protected]>
# Copyright (c) 2021 Daniël van Noord <[email protected]>
# Copyright (c) 2021 Marc Mueller <[email protected]>
# Copyright (c) 2021 Will Shanks <[email protected]>
Expand Down
1 change: 1 addition & 0 deletions pylint/checkers/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
# Copyright (c) 2019 Djailla <[email protected]>
# Copyright (c) 2019 Svet <[email protected]>
# Copyright (c) 2020 Anthony Sottile <[email protected]>
# Copyright (c) 2021 Nick Drozd <[email protected]>
# Copyright (c) 2021 Daniël van Noord <[email protected]>
# Copyright (c) 2021 Marc Mueller <[email protected]>
# Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
Expand Down
1 change: 1 addition & 0 deletions pylint/checkers/raw_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# Copyright (c) 2020-2021 hippo91 <[email protected]>
# Copyright (c) 2020 谭九鼎 <[email protected]>
# Copyright (c) 2021 Daniël van Noord <[email protected]>
# Copyright (c) 2021 bot <[email protected]>
# Copyright (c) 2021 Marc Mueller <[email protected]>

# Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
Expand Down
1 change: 1 addition & 0 deletions pylint/checkers/refactoring/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
# Copyright (c) 2020 lrjball <[email protected]>
# Copyright (c) 2020 Yang Yang <[email protected]>
# Copyright (c) 2020 Anthony Sottile <[email protected]>
# Copyright (c) 2021 Jaehoon Hwang <[email protected]>
# Copyright (c) 2021 Marc Mueller <[email protected]>

# Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
Expand Down
1 change: 1 addition & 0 deletions pylint/checkers/similar.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
# Copyright (c) 2020 Eli Fine <[email protected]>
# Copyright (c) 2020 Shiv Venkatasubrahmanyam <[email protected]>
# Copyright (c) 2021 Daniël van Noord <[email protected]>
# Copyright (c) 2021 Ville Skyttä <[email protected]>
# Copyright (c) 2021 Marc Mueller <[email protected]>
# Copyright (c) 2021 Maksym Humetskyi <[email protected]>
# Copyright (c) 2021 bot <[email protected]>
Expand Down
2 changes: 2 additions & 0 deletions pylint/checkers/spelling.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
# Copyright (c) 2020 hippo91 <[email protected]>
# Copyright (c) 2020 Damien Baty <[email protected]>
# Copyright (c) 2021 Daniël van Noord <[email protected]>
# Copyright (c) 2021 Tushar Sadhwani <[email protected]>
# Copyright (c) 2021 Nick Drozd <[email protected]>
# Copyright (c) 2021 Marc Mueller <[email protected]>
# Copyright (c) 2021 bot <[email protected]>
# Copyright (c) 2021 Andreas Finkler <[email protected]>
Expand Down
2 changes: 2 additions & 0 deletions pylint/checkers/strings.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
# Copyright (c) 2020 hippo91 <[email protected]>
# Copyright (c) 2020 谭九鼎 <[email protected]>
# Copyright (c) 2020 Anthony <[email protected]>
# Copyright (c) 2021 Tushar Sadhwani <[email protected]>
# Copyright (c) 2021 Jaehoon Hwang <[email protected]>
# Copyright (c) 2021 Daniël van Noord <[email protected]>
# Copyright (c) 2021 Marc Mueller <[email protected]>
# Copyright (c) 2021 Peter Kolbus <[email protected]>
Expand Down
5 changes: 3 additions & 2 deletions pylint/checkers/typecheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
# Copyright (c) 2016 Jürgen Hermann <[email protected]>
# Copyright (c) 2016 Jakub Wilk <[email protected]>
# Copyright (c) 2016 Filipe Brandenburger <[email protected]>
# Copyright (c) 2017, 2021 Ville Skyttä <[email protected]>
# Copyright (c) 2017-2018, 2020 hippo91 <[email protected]>
# Copyright (c) 2017 Łukasz Rogalski <[email protected]>
# Copyright (c) 2017 Derek Gustafson <[email protected]>
# Copyright (c) 2017 Ville Skyttä <[email protected]>
# Copyright (c) 2018-2019, 2021 Nick Drozd <[email protected]>
# Copyright (c) 2018 Pablo Galindo <[email protected]>
# Copyright (c) 2018 Jim Robertson <[email protected]>
Expand All @@ -42,9 +42,10 @@
# Copyright (c) 2020 Ram Rachum <[email protected]>
# Copyright (c) 2020 Anthony Sottile <[email protected]>
# Copyright (c) 2020 Anubhav <[email protected]>
# Copyright (c) 2021 Marc Mueller <[email protected]>
# Copyright (c) 2021 Tushar Sadhwani <[email protected]>
# Copyright (c) 2021 Daniël van Noord <[email protected]>
# Copyright (c) 2021 David Liu <[email protected]>
# Copyright (c) 2021 Marc Mueller <[email protected]>
# Copyright (c) 2021 doranid <[email protected]>
# Copyright (c) 2021 yushao2 <[email protected]>
# Copyright (c) 2021 Andrew Haigh <[email protected]>
Expand Down
2 changes: 2 additions & 0 deletions pylint/checkers/unsupported_version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Copyright (c) 2021 Pierre Sassoulas <[email protected]>
# Copyright (c) 2021 Mark Byrne <[email protected]>
# Copyright (c) 2021 Daniël van Noord <[email protected]>

# Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
Expand Down
7 changes: 6 additions & 1 deletion pylint/checkers/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,13 @@
# Copyright (c) 2020 Slavfox <[email protected]>
# Copyright (c) 2020 Anthony Sottile <[email protected]>
# Copyright (c) 2021 Daniël van Noord <[email protected]>
# Copyright (c) 2021 Marc Mueller <30130371+cdce8p@users.noreply.github.com>
# Copyright (c) 2021 Mark Byrne <31762852+mbyrnepr2@users.noreply.github.com>
# Copyright (c) 2021 Nick Drozd <[email protected]>
# Copyright (c) 2021 Arianna Y <[email protected]>
# Copyright (c) 2021 Jaehoon Hwang <[email protected]>
# Copyright (c) 2021 Samuel FORESTIER <[email protected]>
# Copyright (c) 2021 Marc Mueller <[email protected]>
# Copyright (c) 2021 bot <[email protected]>
# Copyright (c) 2021 David Liu <[email protected]>
# Copyright (c) 2021 Matus Valo <[email protected]>
# Copyright (c) 2021 Lorena B <[email protected]>
Expand Down
Loading

0 comments on commit f6d3d39

Please sign in to comment.