Debian Codegraph @

doc/whatsnew/2/2.9/full.rst

raw
1 Full changelog
2 ==============
3
4 What's New in Pylint 2.9.6?
5 ---------------------------
6 Release date: 2021-07-28
7
8 * Fix a false positive ``undefined-variable`` when variable name in decoration
9 matches function argument
10
11 Closes #3791
12
13
14 What's New in Pylint 2.9.5?
15 ---------------------------
16 Release date: 2021-07-21
17
18 * Fix a crash when there would be a 'TypeError object does not support
19 item assignment' in the code we parse.
20
21 Closes #4439
22
23 * Fix crash if a callable returning a context manager was assigned to a list or dict item
24
25 Closes #4732
26
27 * Fix a crash when an AttributeInferenceError was not handled properly when
28 failing to infer the real name of an import in astroid.
29
30 Closes #4692
31
32
33 What's New in Pylint 2.9.4?
34 ---------------------------
35 Release date: 2021-07-20
36
37 * Added ``time.clock`` to deprecated functions/methods for python 3.3
38
39 * Fix bug in which --fail-on can return a zero exit code even when the specified issue is present
40
41 Closes #4296
42 Closes #3363
43
44 * Fix hard failure when handling missing attribute in a class with duplicated bases
45
46 Closes #4687
47
48 * Fix false-positive ``consider-using-with`` (R1732) if a ternary conditional is used together with ``with``
49
50 Closes #4676
51
52 * Fix false-positive ``deprecated-module`` when relative import uses deprecated module name.
53
54 Closes #4629
55
56 * Fix false-positive ``consider-using-with`` (R1732) if ``contextlib.ExitStack`` takes care of calling the ``__exit__`` method
57
58 Closes #4654
59
60 * Fix a false positive for ``unused-private-member`` when mutating a private attribute
61 with ``cls``
62
63 Closes #4657
64
65 * Fix ignored empty functions by similarities checker with "ignore-signatures" option enabled
66
67 Closes #4652
68
69 * Fix false-positive of ``use-maxsplit-arg`` when index is incremented in
70 a loop
71
72 Closes #4664
73
74 * Don't emit ``cyclic-import`` message if import is guarded by ``typing.TYPE_CHECKING``.
75
76 Closes #3525
77
78 * Fix false-positive ``not-callable`` with alternative ``TypedDict`` syntax
79
80 Closes #4715
81
82 * Clarify documentation for :ref:`consider-using-from-import`
83
84 * Don't emit ``unreachable`` warning for empty generator functions
85
86 Closes #4698
87
88 * Don't emit ``import-error``, ``no-name-in-module``, and ``ungrouped-imports``
89 for imports guarded by ``sys.version_info`` or ``typing.TYPE_CHECKING``.
90
91 Closes #3285
92 Closes #3382
93
94 * Fix ``invalid-overridden-method`` with nested property
95
96 Closes #4368
97
98 * Fix false-positive of ``unused-private-member`` when using ``__new__`` in a class
99
100 Closes #4668
101
102 * No longer emit ``consider-using-with`` for ``ThreadPoolExecutor`` and ``ProcessPoolExecutor``
103 as they have legitimate use cases without a ``with`` block.
104
105 Closes #4689
106
107 * Fix crash when inferring variables assigned in match patterns
108
109 Closes #4685
110
111 * Fix a crash when a StopIteration was raised when inferring
112 a faulty function in a context manager.
113
114 Closes #4723
115
116
117 What's New in Pylint 2.9.3?
118 ---------------------------
119 Release date: 2021-07-01
120
121
122 * Fix a crash that happened when analysing empty function with docstring
123 in the ``similarity`` checker.
124
125 Closes #4648
126
127 * The ``similarity`` checker no longer add three trailing whitespaces for
128 empty lines in its report.
129
130
131 What's New in Pylint 2.9.2?
132 ---------------------------
133 Release date: 2021-07-01
134
135 * Fix a crash that happened when analysing code using ``type(self)`` to access
136 a class attribute in the ``unused-private-member`` checker.
137
138 Closes #4638
139
140 * Fix a false positive for ``unused-private-member`` when accessing a private variable
141 with ``self``
142
143 Closes #4644
144
145 * Fix false-positive of ``unnecessary-dict-index-lookup`` and ``consider-using-dict-items``
146 for reassigned dict index lookups
147
148 Closes #4630
149
150
151 What's New in Pylint 2.9.1?
152 ---------------------------
153 Release date: 2021-06-30
154
155 * Upgrade astroid to 2.6.2
156
157 Closes #4631
158 Closes #4633
159
160
161 What's New in Pylint 2.9.0?
162 ---------------------------
163 Release date: 2021-06-29
164
165 * Python 3.10 is now supported.
166
167 * Add type annotations to pyreverse dot files
168
169 Closes #1548
170
171 * Fix missing support for detecting deprecated aliases to existing
172 functions/methods.
173
174 Closes #4618
175
176 * astroid has been upgraded to 2.6.1
177
178 * Added various deprecated functions/methods for python 3.10, 3.7, 3.6 and 3.3
179
180 * Fix false positive ``useless-type-doc`` on ignored argument using ``pylint.extensions.docparams``
181 when a function was typed using pep484 but not inside the docstring.
182
183 Closes #4117
184 Closes #4593
185
186 * ``setuptools_scm`` has been removed and replaced by ``tbump`` in order to not
187 have hidden runtime dependencies to setuptools
188
189 * Fix a crash when a test function is decorated with ``@pytest.fixture`` and astroid can't
190 infer the name of the decorator when using ``open`` without ``with``.
191
192 Closes #4612
193
194 * Added ``deprecated-decorator``: Emitted when deprecated decorator is used.
195
196 Closes #4429
197
198 * Added ``ignore-paths`` behaviour. Defined regex patterns are matched against full file path.
199
200 Closes #2541
201
202 * Fix false negative for ``consider-using-with`` if calls like ``open()`` were used outside of assignment expressions.
203
204 * The warning for ``arguments-differ`` now signals explicitly the difference it detected
205 by naming the argument or arguments that changed and the type of change that occurred.
206
207 * Suppress ``consider-using-with`` inside context managers.
208
209 Closes #4430
210
211 * Added ``--fail-on`` option to return non-zero exit codes regardless of ``--fail-under`` value.
212
213 * numversion tuple contains integers again to fix multiple pylint's plugins that relied on it
214
215 Closes #4420
216
217 * Fix false-positive ``too-many-ancestors`` when inheriting from builtin classes,
218 especially from the ``collections.abc`` module
219
220 Closes #4166
221 Closes #4415
222
223 * Stdlib deprecated modules check is moved to stdlib checker. New deprecated
224 modules are added.
225
226 * Fix raising false-positive ``no-member`` on abstract properties
227
228 * Created new error message called ``arguments-renamed`` which identifies any changes at the parameter
229 names of overridden functions.
230
231 Closes #3536
232
233 * New checker ``consider-using-dict-items``. Emitted when iterating over dictionary keys and then
234 indexing the same dictionary with the key within loop body.
235
236 Closes #3389
237
238 * Don't emit ``import-error`` if import guarded behind ``if sys.version_info >= (x, x)``
239
240 * Fix incompatibility with Python 3.6.0 caused by ``typing.Counter`` and ``typing.NoReturn`` usage
241
242 Closes #4412
243
244 * New checker ``use-maxsplit-arg``. Emitted either when accessing only the first or last
245 element of ``str.split()``.
246
247 Closes #4440
248
249 * Add ignore_signatures to duplicate code checker
250
251 Closes #3619
252
253 * Fix documentation errors in "Block disables" paragraph of User Guide.
254
255 * New checker ``unnecessary-dict-index-lookup``. Emitted when iterating over dictionary items
256 (key-value pairs) and accessing the value by index lookup.
257
258 Closes #4470
259
260 * New checker``consider-using-from-import``. Emitted when a submodule/member of a package is imported and aliased
261 with the same name.
262
263 Closes #2309
264
265 * Allow comma-separated list in ``output-format`` and separate output files for
266 each specified format.
267
268 Closes #1798
269
270 * Make ``using-constant-test`` detect constant tests consisting of list literals like ``[]`` and
271 ``[1, 2, 3]``.
272
273 * Improved error message of ``unnecessary-comprehension`` checker by providing code suggestion.
274
275 Closes #4499
276
277 * New checker ``unused-private-member``. Emitted when a private member (i.e., starts with ``__``) of a class
278 is defined but not used.
279
280 Closes #4483
281
282 * Fix false negative of ``consider-using-enumerate`` when iterating over an attribute.
283
284 Closes #3657
285
286 * New checker ``invalid-class-object``. Emitted when a non-class is assigned to a ``__class__`` attribute.
287
288 Closes #585
289
290 * Fix a crash when a plugin from the configuration could not be loaded and raise an error
291 :ref:`bad-plugin-value`' instead
292
293 Closes #4555
294
295 * Added handling of floating point values when parsing configuration from pyproject.toml
296
297 Closes #4518
298
299 * ``invalid-length-returned``, now also works when nothing at all is returned
300 following an upgrade in astroid.
301
302 * ``logging-format-interpolation`` and ``logging-not-lazy``, now works on logger
303 class created from renamed logging import following an upgrade in astroid.
304
305 * Fix false-positive ``no-member`` with generic base class
306
307 Closes pylint-dev/astroid#942
308
309 * Fix ``assigning-non-slot`` false-positive with base that inherits from ``typing.Generic``
310
311 Closes #4509
312 Closes pylint-dev/astroid#999
313
314 * New checker ``invalid-all-format``. Emitted when ``__all__`` has an invalid format,
315 i.e. isn't a ``tuple`` or ``list``.
316
317 * Fix false positive ``unused-variable`` and ``undefined-variable`` with
318 Pattern Matching in Python 3.10
319
320 * New checker ``await-outside-async``. Emitted when await is used outside an async function.
321
322 * Clarify documentation for ``typing`` extension.
323
324 Closes #4545
325
326 * Add new extension ``CodeStyleChecker``. It includes checkers that can improve code
327 consistency. As such they don't necessarily provide a performance benefit
328 and are often times opinionated.
329
330 * New checker ``consider-using-tuple``. Emitted when an in-place defined
331 list or set can be replaced by a tuple.
332
333 * New checker ``consider-using-namedtuple-or-dataclass``. Emitted when dictionary values
334 can be replaced by namedtuples or dataclass instances.
335
336 * Fix error that occurred when using ``slice`` as subscript for dict.
337
338 * Reduce false-positives around inference of ``.value`` and ``.name``
339 properties on ``Enum`` subclasses, following an upgrade in astroid
340
341 Closes #1932
342 Closes #2062
343
344 * Fix issue with ``cached_property`` that caused ``invalid-overridden-method`` error
345 when overriding a ``property``.
346
347 Closes #4023
348
349 * Fix ``unused-import`` false positive for imported modules referenced in
350 attribute lookups in type comments.
351
352 Closes #4603