Skip to content

Commit b738d23

Browse files
Pierre-Sassoulasjacobtylerwalls
authored andcommitted
Bump pylint to 3.2.0, update changelog
1 parent 040ce17 commit b738d23

15 files changed

+85
-49
lines changed

doc/whatsnew/3/3.2/index.rst

+76-1
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,80 @@
1212
Summary -- Release highlights
1313
=============================
1414

15-
1615
.. towncrier release notes start
16+
17+
What's new in Pylint 3.2.0?
18+
---------------------------
19+
Release date: 2024-05-14
20+
21+
22+
New Features
23+
------------
24+
25+
- Understand `six.PY2` and `six.PY3` for conditional imports.
26+
27+
Closes #3501 (`#3501 <https://github.com/pylint-dev/pylint/issues/3501>`_)
28+
29+
- A new `github` reporter has been added. This reporter returns the output of `pylint` in a format that
30+
Github can use to automatically annotate code. Use it with `pylint --output-format=github` on your Github Workflows.
31+
32+
Closes #9443. (`#9443 <https://github.com/pylint-dev/pylint/issues/9443>`_)
33+
34+
35+
36+
New Checks
37+
----------
38+
39+
- Add check ``possibly-used-before-assignment`` when relying on names after an ``if/else``
40+
switch when one branch failed to define the name, raise, or return.
41+
42+
Closes #1727 (`#1727 <https://github.com/pylint-dev/pylint/issues/1727>`_)
43+
44+
- Checks for generators that use contextmanagers that don't handle cleanup properly.
45+
Is meant to raise visibility on the case that a generator is not fully exhausted and the contextmanager is not cleaned up properly.
46+
A contextmanager must yield a non-constant value and not handle cleanup for GeneratorExit.
47+
The using generator must attempt to use the yielded context value `with x() as y` and not just `with x()`.
48+
49+
Closes #2832 (`#2832 <https://github.com/pylint-dev/pylint/issues/2832>`_)
50+
51+
52+
53+
False Negatives Fixed
54+
---------------------
55+
56+
- If and Try nodes are now checked for useless return statements as well.
57+
58+
Closes #9449. (`#9449 <https://github.com/pylint-dev/pylint/issues/9449>`_)
59+
60+
- Fix false negative for ``property-with-parameters`` in the case of parameters which are ``positional-only``, ``keyword-only``, ``variadic positional`` or ``variadic keyword``.
61+
62+
Closes #9584 (`#9584 <https://github.com/pylint-dev/pylint/issues/9584>`_)
63+
64+
False Positives Fixed
65+
---------------------
66+
67+
pylint now understands the ``@overload`` decorator return values better.
68+
69+
Closes #4696 (`#4696 <https://github.com/pylint-dev/pylint/issues/4696>`_)
70+
Refs #9606 (`#9606 <https://github.com/pylint-dev/pylint/issues/9606>`_)
71+
72+
Performance Improvements
73+
------------------------
74+
75+
76+
- Ignored modules are now not checked at all, instead of being checked and then
77+
ignored. This should speed up the analysis of large codebases which have
78+
ignored modules.
79+
80+
Closes #9442 (`#9442 <https://github.com/pylint-dev/pylint/issues/9442>`_) (`#9442 <https://github.com/pylint-dev/pylint/issues/9442>`_)
81+
82+
83+
- ImportChecker's logic has been modified to avoid context files when possible. This makes it possible
84+
to cache module searches on astroid and reduce execution times.
85+
86+
Refs #9310. (`#9310 <https://github.com/pylint-dev/pylint/issues/9310>`_)
87+
88+
- An internal check for ``trailing-comma-tuple`` being enabled for a file or not is now
89+
done once per file instead of once for each token.
90+
91+
Refs #9608. (`#9608 <https://github.com/pylint-dev/pylint/issues/9608>`_)

doc/whatsnew/fragments/1727.new_check

-4
This file was deleted.

doc/whatsnew/fragments/2832.new_check

-6
This file was deleted.

doc/whatsnew/fragments/3501.feature

-3
This file was deleted.

doc/whatsnew/fragments/9310.performance

-4
This file was deleted.

doc/whatsnew/fragments/9442.other

-5
This file was deleted.

doc/whatsnew/fragments/9443.feature

-4
This file was deleted.

doc/whatsnew/fragments/9449.false_negative

-3
This file was deleted.

doc/whatsnew/fragments/9584.false_negative

-3
This file was deleted.

doc/whatsnew/fragments/9606.internal

-3
This file was deleted.

doc/whatsnew/fragments/9608.performance

-4
This file was deleted.

examples/pylintrc

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ ignore-patterns=^\.#
6262
# List of module names for which member attributes should not be checked and
6363
# will not be imported (useful for modules/projects where namespaces are
6464
# manipulated during runtime and thus existing member attributes cannot be
65-
# deduced by static analysis). It supports qualified module names, as well
66-
# as Unix pattern matching.
65+
# deduced by static analysis). It supports qualified module names, as well as
66+
# Unix pattern matching.
6767
ignored-modules=
6868

6969
# Python code to execute, usually for sys.path manipulation such as

examples/pyproject.toml

+5-5
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ ignore = ["CVS"]
4949
# file locks
5050
ignore-patterns = ["^\\.#"]
5151

52-
# List of module names for which member attributes should not be checked and
53-
# will not be imported (useful for modules/projects where namespaces are
54-
# manipulated during runtime and thus existing member attributes cannot be
55-
# deduced by static analysis). It supports qualified module names, as well
56-
# as Unix pattern matching.
52+
# List of module names for which member attributes should not be checked and will
53+
# not be imported (useful for modules/projects where namespaces are manipulated
54+
# during runtime and thus existing member attributes cannot be deduced by static
55+
# analysis). It supports qualified module names, as well as Unix pattern
56+
# matching.
5757
# ignored-modules =
5858

5959
# Python code to execute, usually for sys.path manipulation such as

pylint/__pkginfo__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
from __future__ import annotations
1111

12-
__version__ = "3.2.0-dev0"
12+
__version__ = "3.2.0"
1313

1414

1515
def get_numversion_from_version(v: str) -> tuple[int, int, int]:

tbump.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
github_url = "https://github.com/pylint-dev/pylint"
22

33
[version]
4-
current = "3.2.0-dev0"
4+
current = "3.2.0"
55
regex = '''
66
^(?P<major>0|[1-9]\d*)
77
\.

0 commit comments

Comments
 (0)