3
3
***************************
4
4
5
5
:Release: 2.12
6
- :Date: TBA
6
+ :Date: 2021-11-24
7
7
8
8
Summary -- Release highlights
9
9
=============================
10
10
11
+ In 2.12, we introduced a new option ``py-version `` that permits to analyse code for a python
12
+ version that may differ from your current python interpreter. This does not affect all checkers but
13
+ permits, for example, to check for python 3.5 code smells (using f-string's) while using pylint with python 3.6.
14
+ The minimum version to run pylint is now 3.6.2, while the last working version for python 3.6.0
15
+ and 3.6.1 was pylint 2.9.3.
16
+
17
+ On top of fixing a lot of false positives and bugs, we also added new default checks, like
18
+ ``use-implicit-booleaness-not-comparison ``, ``overridden-final-method ``, and ``useless-with-lock ``.
19
+ There's also better check for TOML configurations.
20
+
21
+ Lastly, in addition to the information we already had about start line and start column,
22
+ we introduced new information about the end line and end column of messages. This
23
+ will permit to have more precise visual clue in IDE like in pylint for vs-code. The default
24
+ will stay the same to not break compatibility but it can be retrieved by adding ``end_line ``
25
+ and ``end_column `` to the ``--msg-template `` option. For better result stick to python 3.8+.
26
+
27
+ The checker for Yoda conditions is now an extension, you might want to enable it if you were
28
+ relying on this check. There's also a new extension checker, ``consider-using-any-or-all `` that
29
+ detects for loops that could be replaced by any or all, entirely contributed by @areveny,
30
+ welcome to the team !
11
31
12
32
New checkers
13
33
============
@@ -33,11 +53,6 @@ New checkers
33
53
* Added ``using-f-string-in-unsupported-version `` checker. Issued when ``py-version ``
34
54
is set to a version that does not support f-strings (< 3.6)
35
55
36
- * Fix ``useless-super-delegation `` false positive when default keyword argument is a variable.
37
-
38
- * Added new checker ``use-implicit-booleanness ``: Emitted when using collection
39
- literals for boolean comparisons
40
-
41
56
* Added new checker ``use-implicit-booleaness-not-comparison ``: Emitted when
42
57
collection literal comparison is being used to check for emptiness.
43
58
@@ -46,11 +61,6 @@ New checkers
46
61
* Added ``using-final-decorator-in-unsupported-version `` checker. Issued when ``py-version ``
47
62
is set to a version that does not support typing.final (< 3.8)
48
63
49
- * Added configuration option ``exclude-too-few-public-methods `` to allow excluding
50
- classes from the ``min-public-methods `` checker.
51
-
52
- Closes #3370
53
-
54
64
* Added new checker ``useless-with-lock `` to find incorrect usage of with statement and threading module locks.
55
65
Emitted when ``with threading.Lock(): `` is used instead of ``with lock_instance: ``.
56
66
@@ -69,12 +79,9 @@ New checkers
69
79
* ``add_message `` of the unittest ``testutil `` now actually handles the ``col_offset `` parameter
70
80
and allows it to be checked against actual output in a test.
71
81
72
- Removed checkers
73
- ================
74
-
75
-
76
82
Extensions
77
83
==========
84
+
78
85
* Added an optional extension ``consider-using-any-or-all ``: Emitted when a ``for `` loop only
79
86
produces a boolean and could be replaced by ``any `` or ``all `` using a generator. Also suggests
80
87
a suitable any/all statement if it is concise.
@@ -96,6 +103,11 @@ Other Changes
96
103
97
104
Closes #5178
98
105
106
+ * Added configuration option ``exclude-too-few-public-methods `` to allow excluding
107
+ classes from the ``min-public-methods `` checker.
108
+
109
+ Closes #3370
110
+
99
111
* Fix ``accept-no-yields-doc `` and ``accept-no-return-doc `` not allowing missing ``yield `` or
100
112
``return `` documentation when a docstring is partially correct
101
113
@@ -199,6 +211,8 @@ Other Changes
199
211
200
212
* Fix crash for ``protected-access `` on (outer) class traversal
201
213
214
+ * Fix ``useless-super-delegation `` false positive when default keyword argument is a variable.
215
+
202
216
* Make yn validator case insensitive, to allow for ``True `` and ``False `` in config files.
203
217
204
218
* The last version compatible with python '3.6.0' and '3.6.1' is pylint '2.9.3'. We did not
0 commit comments