summaryrefslogtreecommitdiff
path: root/doc/whatsnew/2.11.rst
blob: cdbba865d4604daf193ef3a5232852a30072922e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
***************************
 What's New in Pylint 2.11
***************************

:Release: 2.11
:Date: TBA

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


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

* Added ``consider-using-f-string``: Emitted when .format() or '%' is being used to format a string.

  Closes #3592

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

* The python3 porting mode checker and it's ``py3k`` option were removed. You can still find it in older pylint
  versions.

Extensions
==========

* Added new extension ``SetMembershipChecker`` with ``use-set-for-membership`` check:
  Emitted when using an in-place defined ``list`` or ``tuple`` to do a membership test. ``sets`` are better optimized for that.

  Closes #4776

* ``CodeStyleChecker``

  * Added ``consider-using-assignment-expr``: Emitted when an assignment is directly followed by an if statement
    and both can be combined by using an assignment expression ``:=``. Requires Python 3.8

    Closes #4862


Other Changes
=============

* Added ``py-version`` config key (if ``[MASTER]`` section). Used for version dependant checks.
  Will default to whatever Python version pylint is executed with.

* The ``invalid-name`` message is now more detailed when using multiple naming style regexes.

* Fix false positive for ``consider-using-with`` if a context manager is assigned to a
  variable in different paths of control flow (e. g. if-else clause).

  Closes #4751

* Fix false positive for ``function-redefined`` for simple type annotations

  Closes #4936

* Fix false positive for ``protected-access`` if a protected member is used in type hints of function definitions

* Fix false positive ``dict-iter-missing-items`` for dictionaries only using tuples as keys

  Closes #3282

* The ``unspecified-encoding`` checker now also checks calls to ``pathlib.Path().read_text()``
  and ``pathlib.Path().write_text()``

  Closes #4945

* Fix false positive ``superfluous-parens`` for tuples created with inner tuples

  Closes #4907