Skip to content

Commit

Permalink
Bump pylint to 3.2.0, update changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Sassoulas authored and jacobtylerwalls committed May 14, 2024
1 parent 040ce17 commit b738d23
Show file tree
Hide file tree
Showing 15 changed files with 85 additions and 49 deletions.
77 changes: 76 additions & 1 deletion doc/whatsnew/3/3.2/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,80 @@
Summary -- Release highlights
=============================


.. towncrier release notes start
What's new in Pylint 3.2.0?
---------------------------
Release date: 2024-05-14


New Features
------------

- Understand `six.PY2` and `six.PY3` for conditional imports.

Closes #3501 (`#3501 <https://github.com/pylint-dev/pylint/issues/3501>`_)

- A new `github` reporter has been added. This reporter returns the output of `pylint` in a format that
Github can use to automatically annotate code. Use it with `pylint --output-format=github` on your Github Workflows.

Closes #9443. (`#9443 <https://github.com/pylint-dev/pylint/issues/9443>`_)



New Checks
----------

- Add check ``possibly-used-before-assignment`` when relying on names after an ``if/else``
switch when one branch failed to define the name, raise, or return.

Closes #1727 (`#1727 <https://github.com/pylint-dev/pylint/issues/1727>`_)

- Checks for generators that use contextmanagers that don't handle cleanup properly.
Is meant to raise visibility on the case that a generator is not fully exhausted and the contextmanager is not cleaned up properly.
A contextmanager must yield a non-constant value and not handle cleanup for GeneratorExit.
The using generator must attempt to use the yielded context value `with x() as y` and not just `with x()`.

Closes #2832 (`#2832 <https://github.com/pylint-dev/pylint/issues/2832>`_)



False Negatives Fixed
---------------------

- If and Try nodes are now checked for useless return statements as well.

Closes #9449. (`#9449 <https://github.com/pylint-dev/pylint/issues/9449>`_)

- Fix false negative for ``property-with-parameters`` in the case of parameters which are ``positional-only``, ``keyword-only``, ``variadic positional`` or ``variadic keyword``.

Closes #9584 (`#9584 <https://github.com/pylint-dev/pylint/issues/9584>`_)

False Positives Fixed
---------------------

pylint now understands the ``@overload`` decorator return values better.

Closes #4696 (`#4696 <https://github.com/pylint-dev/pylint/issues/4696>`_)
Refs #9606 (`#9606 <https://github.com/pylint-dev/pylint/issues/9606>`_)

Performance Improvements
------------------------


- Ignored modules are now not checked at all, instead of being checked and then
ignored. This should speed up the analysis of large codebases which have
ignored modules.

Closes #9442 (`#9442 <https://github.com/pylint-dev/pylint/issues/9442>`_) (`#9442 <https://github.com/pylint-dev/pylint/issues/9442>`_)


- ImportChecker's logic has been modified to avoid context files when possible. This makes it possible
to cache module searches on astroid and reduce execution times.

Refs #9310. (`#9310 <https://github.com/pylint-dev/pylint/issues/9310>`_)

- An internal check for ``trailing-comma-tuple`` being enabled for a file or not is now
done once per file instead of once for each token.

Refs #9608. (`#9608 <https://github.com/pylint-dev/pylint/issues/9608>`_)
4 changes: 0 additions & 4 deletions doc/whatsnew/fragments/1727.new_check

This file was deleted.

6 changes: 0 additions & 6 deletions doc/whatsnew/fragments/2832.new_check

This file was deleted.

3 changes: 0 additions & 3 deletions doc/whatsnew/fragments/3501.feature

This file was deleted.

4 changes: 0 additions & 4 deletions doc/whatsnew/fragments/9310.performance

This file was deleted.

5 changes: 0 additions & 5 deletions doc/whatsnew/fragments/9442.other

This file was deleted.

4 changes: 0 additions & 4 deletions doc/whatsnew/fragments/9443.feature

This file was deleted.

3 changes: 0 additions & 3 deletions doc/whatsnew/fragments/9449.false_negative

This file was deleted.

3 changes: 0 additions & 3 deletions doc/whatsnew/fragments/9584.false_negative

This file was deleted.

3 changes: 0 additions & 3 deletions doc/whatsnew/fragments/9606.internal

This file was deleted.

4 changes: 0 additions & 4 deletions doc/whatsnew/fragments/9608.performance

This file was deleted.

4 changes: 2 additions & 2 deletions examples/pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ ignore-patterns=^\.#
# List of module names for which member attributes should not be checked and
# will not be imported (useful for modules/projects where namespaces are
# manipulated during runtime and thus existing member attributes cannot be
# deduced by static analysis). It supports qualified module names, as well
# as Unix pattern matching.
# deduced by static analysis). It supports qualified module names, as well as
# Unix pattern matching.
ignored-modules=

# Python code to execute, usually for sys.path manipulation such as
Expand Down
10 changes: 5 additions & 5 deletions examples/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ ignore = ["CVS"]
# file locks
ignore-patterns = ["^\\.#"]

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

# Python code to execute, usually for sys.path manipulation such as
Expand Down
2 changes: 1 addition & 1 deletion pylint/__pkginfo__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from __future__ import annotations

__version__ = "3.2.0-dev0"
__version__ = "3.2.0"


def get_numversion_from_version(v: str) -> tuple[int, int, int]:
Expand Down
2 changes: 1 addition & 1 deletion tbump.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
github_url = "https://github.com/pylint-dev/pylint"

[version]
current = "3.2.0-dev0"
current = "3.2.0"
regex = '''
^(?P<major>0|[1-9]\d*)
\.
Expand Down

0 comments on commit b738d23

Please sign in to comment.