Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release branch 3.1.0 #9461

Merged
merged 3 commits into from
Feb 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion CONTRIBUTORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@ contributors:
* Added new extension which detects comparing integers to zero,
* Added new useless-return checker,
* Added new try-except-raise checker
- theirix <[email protected]>
- crazybolillo <[email protected]>
- Téo Bouvard <[email protected]>
- Stavros Ntentos <[email protected]>
- Nicolas Boulenguez <[email protected]>
Expand All @@ -172,7 +174,6 @@ contributors:
- Andreas Freimuth <[email protected]>: fix indentation checking with tabs
- Alexandru Coman <[email protected]>
- jpkotta <[email protected]>
- crazybolillo <[email protected]>
- Takahide Nojima <[email protected]>
- Taewon D. Kim <[email protected]>
- Sneaky Pete <[email protected]>
Expand Down Expand Up @@ -249,6 +250,7 @@ contributors:
- omarandlorraine <[email protected]>
- craig-sh <[email protected]>
- bernie gray <[email protected]>
- azinneck0485 <[email protected]>
- Wes Turner <[email protected]> (Google): added new check 'inconsistent-quotes'
- Tyler Thieding <[email protected]>
- Tobias Hernstig <[email protected]>
Expand Down Expand Up @@ -364,12 +366,14 @@ contributors:
- Yann Dirson <[email protected]>
- Yang Yang <[email protected]>
- Xi Shen <[email protected]>
- Winston H <[email protected]>
- Will Shanks <[email protected]>
- Viorel Știrbu <[email protected]>: intern-builtin warning.
- VictorT <[email protected]>
- Victor Jiajunsu <[email protected]>
- ViRuSTriNiTy <[email protected]>
- Val Lorentz <[email protected]>
- Udi Fuchs <[email protected]>
- Trevor Bekolay <[email protected]>
* Added --list-msgs-enabled command
- Tomer Chachamu <[email protected]>: simplifiable-if-expression
Expand All @@ -394,11 +398,13 @@ contributors:
- Sigurd Spieckermann <[email protected]>
- Shiv Venkatasubrahmanyam <[email protected]>
- Sebastian Müller <[email protected]>
- Sayyed Faisal Ali <[email protected]>
- Sasha Bagan <[email protected]>
- Sardorbek Imomaliev <[email protected]>
- Santiago Castro <[email protected]>
- Samuel Freilich <[email protected]> (sfreilich)
- Sam Vermeiren <[email protected]>
- Ryan Ozawa <[email protected]>
- Ryan McGuire <[email protected]>
- Ry4an Brase <[email protected]>
- Ruro <[email protected]>
Expand Down Expand Up @@ -435,22 +441,28 @@ contributors:
- Neowizard <[email protected]>
- Ned Batchelder <[email protected]>
- Natalie Serebryakova <[email protected]>
- Naglis Jonaitis <[email protected]>
- Moody <[email protected]>
- Mitchell Young <[email protected]>: minor adjustment to docparams
- Mitar <[email protected]>
- Ming Lyu <[email protected]>
- Mikhail f. Shiryaev <[email protected]>
- Mike Fiedler <[email protected]> (miketheman)
- Mike Bryant <[email protected]>
- Mike Bernard <[email protected]>
- Michka Popoff <[email protected]>
- Michal Vasilek <[email protected]>
- Michael Scott Cuthbert <[email protected]>
- Michael Kefeder <[email protected]>
- Michael K <[email protected]>
- Michael Hudson-Doyle <[email protected]>
- Michael Giuffrida <[email protected]>
- Melvin Hazeleger <[email protected]>
- Meltem Kenis <[email protected]>
- Mehdi Drissi <[email protected]>
- Matěj Grabovský <[email protected]>
- Matthijs Blom <[email protected]>
- Matej Spiller Muys <[email protected]>
- Matej Marušák <[email protected]>
- Markus Siebenhaar <[email protected]>
- Marco Edward Gorelli <[email protected]>: Documented Jupyter integration
Expand Down Expand Up @@ -529,6 +541,7 @@ contributors:
- Dr. Nick <[email protected]>
- Don Jayamanne <[email protected]>
- Dmytro Kyrychuk <[email protected]>
- Dionisio E Alonso <[email protected]>
- DetachHead <[email protected]>
- Denis Laxalde <[email protected]>
- David Lawson <[email protected]>
Expand All @@ -547,6 +560,7 @@ contributors:
- Cubicpath <[email protected]>
- Craig Citro <[email protected]>
- Cosmo <[email protected]>
- Clément Schreiner <[email protected]>
- Clément Pit-Claudel <[email protected]>
- Christopher Zurcher <[email protected]>
- Christian Clauss <[email protected]>
Expand Down Expand Up @@ -580,6 +594,7 @@ contributors:
- Andrew Howe <[email protected]>
- Andres Perez Hortal <[email protected]>
- Andre Hora <[email protected]>
- Aman Salwan <[email protected]>
- Alok Singh <[email protected]>
- Allan Chandler <[email protected]> (allanc65)
* Fixed issue 5452, false positive missing-param-doc for multi-line Google-style params
Expand Down
2 changes: 1 addition & 1 deletion doc/development_guide/contributor_guide/release.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ For example:
close ``2.4.0``, create ``2.4.1`` and ``2.6.0``)
- Hide and deactivate all the patch releases for the previous minor
release on
`readthedoc <https://readthedocs.org/projects/pylint/versions/>`__,
`readthedocs <https://readthedocs.org/projects/pylint/versions/>`__,
except the last one. (For example: hide ``v2.4.0``, ``v2.4.1``,
``v2.4.2`` and keep only ``v2.4.3``)

Expand Down
108 changes: 107 additions & 1 deletion doc/whatsnew/3/3.1/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,116 @@
:maxdepth: 2

:Release:3.1
:Date: TBA
:Date: 2024-02-25

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

Two new checks--``use-yield-from``, ``deprecated-attribute``--
and a smattering of bug fixes.

.. towncrier release notes start

What's new in Pylint 3.1.0?
---------------------------
Release date: 2024-02-25


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

- Skip ``consider-using-join`` check for non-empty separators if an ``suggest-join-with-non-empty-separator`` option is set to ``no``.

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

- Discover ``.pyi`` files when linting.

These can be ignored with the ``ignore-patterns`` setting.

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

- Check ``TypeAlias`` and ``TypeVar`` (PEP 695) nodes for ``invalid-name``.

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

- Support for resolving external toml files named pylintrc.toml and .pylintrc.toml.

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

- Check for `.clear`, `.discard`, `.pop` and `remove` methods being called on a set while it is being iterated over.

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



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

- New message `use-yield-from` added to the refactoring checker. This message is emitted when yielding from a loop can be replaced by `yield from`.

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

- Added a ``deprecated-attribute`` message to check deprecated attributes in the stdlib.

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


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

- Fixed false positive for ``inherit-non-class`` for generic Protocols.

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

- Exempt ``TypedDict`` from ``typing_extensions`` from ``too-many-ancestor`` checks.

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



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

- Extend broad-exception-raised and broad-exception-caught to except*.

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

- Fix a false-negative for unnecessary if blocks using a different than expected ordering of arguments.

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



Other Bug Fixes
---------------

- Improve the message provided for wrong-import-order check. Instead of the import statement ("import x"), the message now specifies the import that is out of order and which imports should come after it. As reported in the issue, this is particularly helpful if there are multiple imports on a single line that do not follow the PEP8 convention.

The message will report imports as follows:
For "import X", it will report "(standard/third party/first party/local) import X"
For "import X.Y" and "from X import Y", it will report "(standard/third party/first party/local) import X.Y"
The import category is specified to provide explanation as to why pylint has issued the message and guidence to the developer on how to fix the problem.

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



Other Changes
-------------

- Print how many files were checked in verbose mode.

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

- Fix a crash when an enum class which is also decorated with a ``dataclasses.dataclass`` decorator is defined.

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



Internal Changes
----------------

- Update astroid version to 3.1.0.

Refs #9457 (`#9457 <https://github.com/pylint-dev/pylint/issues/9457>`_)
16 changes: 16 additions & 0 deletions doc/whatsnew/3/3.2/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

***************************
What's New in Pylint 3.2
***************************

.. toctree::
:maxdepth: 2

:Release:3.2
:Date: TBA

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


.. towncrier release notes start
1 change: 1 addition & 0 deletions doc/whatsnew/3/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ This is the full list of change in pylint 3.x minors, by categories.
.. toctree::
:maxdepth: 2

3.2/index
3.1/index
3.0/index
3 changes: 0 additions & 3 deletions doc/whatsnew/fragments/8701.feature

This file was deleted.

8 changes: 0 additions & 8 deletions doc/whatsnew/fragments/8808.bugfix

This file was deleted.

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

This file was deleted.

3 changes: 0 additions & 3 deletions doc/whatsnew/fragments/8855.new_check

This file was deleted.

3 changes: 0 additions & 3 deletions doc/whatsnew/fragments/8935.other

This file was deleted.

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

This file was deleted.

5 changes: 0 additions & 5 deletions doc/whatsnew/fragments/9097.feature

This file was deleted.

3 changes: 0 additions & 3 deletions doc/whatsnew/fragments/9100.other

This file was deleted.

3 changes: 0 additions & 3 deletions doc/whatsnew/fragments/9106.false_positive

This file was deleted.

3 changes: 0 additions & 3 deletions doc/whatsnew/fragments/9167.false_positive

This file was deleted.

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

This file was deleted.

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

This file was deleted.

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

This file was deleted.

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

This file was deleted.

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

This file was deleted.

5 changes: 5 additions & 0 deletions examples/pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,11 @@ max-nested-blocks=5
# printed.
never-returning-functions=sys.exit,argparse.parse_error

# Let 'consider-using-join' be raised when the separator to join on would be
# non-empty (resulting in expected fixes of the type: ``"- " + " -
# ".join(items)``)
suggest-join-with-non-empty-separator=yes


[REPORTS]

Expand Down
4 changes: 4 additions & 0 deletions examples/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,10 @@ max-nested-blocks = 5
# considered as an explicit return statement and no message will be printed.
never-returning-functions = ["sys.exit", "argparse.parse_error"]

# Let 'consider-using-join' be raised when the separator to join on would be non-
# empty (resulting in expected fixes of the type: ``"- " + " - ".join(items)``)
suggest-join-with-non-empty-separator = true

[tool.pylint.reports]
# Python expression which should return a score less than or equal to 10. You
# have access to the variables 'fatal', 'error', 'warning', 'refactor',
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.1.0-dev0"
__version__ = "3.2.0-dev0"


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.1.0-dev0"
current = "3.2.0-dev0"
regex = '''
^(?P<major>0|[1-9]\d*)
\.
Expand Down
4 changes: 2 additions & 2 deletions towncrier.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tool.towncrier]
version = "3.1.0"
version = "3.2.0"
directory = "doc/whatsnew/fragments"
filename = "doc/whatsnew/3/3.1/index.rst"
filename = "doc/whatsnew/3/3.2/index.rst"
template = "doc/whatsnew/fragments/_template.rst"
issue_format = "`#{issue} <https://github.com/pylint-dev/pylint/issues/{issue}>`_"
wrap = false # doesn't wrap links correctly if beginning with indentation
Expand Down
Loading