From 3410e45b66779957086419f35d5acc731058d80d Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Sun, 4 May 2025 16:22:48 +0200 Subject: [PATCH 1/2] Bump pylint to 3.3.7, update changelog --- doc/whatsnew/3/3.3/index.rst | 41 +++++++++++++++++++++ doc/whatsnew/fragments/10105.bugfix | 3 -- doc/whatsnew/fragments/10161.false_positive | 3 -- doc/whatsnew/fragments/10277.other | 4 -- doc/whatsnew/fragments/10282.bugfix | 3 -- doc/whatsnew/fragments/10334.bugfix | 3 -- examples/pylintrc | 8 ++-- examples/pyproject.toml | 7 ++-- pylint/__pkginfo__.py | 2 +- tbump.toml | 2 +- towncrier.toml | 2 +- 11 files changed, 52 insertions(+), 26 deletions(-) delete mode 100644 doc/whatsnew/fragments/10105.bugfix delete mode 100644 doc/whatsnew/fragments/10161.false_positive delete mode 100644 doc/whatsnew/fragments/10277.other delete mode 100644 doc/whatsnew/fragments/10282.bugfix delete mode 100644 doc/whatsnew/fragments/10334.bugfix diff --git a/doc/whatsnew/3/3.3/index.rst b/doc/whatsnew/3/3.3/index.rst index b6bb419f4b..e6cc05ea3f 100644 --- a/doc/whatsnew/3/3.3/index.rst +++ b/doc/whatsnew/3/3.3/index.rst @@ -14,6 +14,47 @@ Summary -- Release highlights .. towncrier release notes start +What's new in Pylint 3.3.7? +--------------------------- +Release date: 2025-05-04 + + +False Positives Fixed +--------------------- + +- Comparisons between two calls to `type()` won't raise an ``unidiomatic-typecheck`` warning anymore, consistent with the behavior applied only for ``==`` previously. + + Closes #10161 (`#10161 `_) + + + +Other Bug Fixes +--------------- + +- Fixed a crash when importing a class decorator that did not exist with the same name than a class attribute after the class definition. + + Closes #10105 (`#10105 `_) + +- Fix a crash caused by malformed format strings when using `.format` with keyword arguments. + + Closes #10282 (`#10282 `_) + +- Using a slice as a class decorator now raise a 'not-callable' message instead of crashing pylint. A lot of checks that dealt with decorators (too many to list) are now shortcut if the decorator can't immediately be inferred to a function or class definition. + + Closes #10334 (`#10334 `_) + + + +Other Changes +------------- + +- The algorithm used for ``no-member`` suggestions is now more efficient and cut the + calculation when the distance score is already above the threshold. + + Refs #10277 (`#10277 `_) + + + What's new in Pylint 3.3.6? --------------------------- Release date: 2025-03-20 diff --git a/doc/whatsnew/fragments/10105.bugfix b/doc/whatsnew/fragments/10105.bugfix deleted file mode 100644 index 608a723f71..0000000000 --- a/doc/whatsnew/fragments/10105.bugfix +++ /dev/null @@ -1,3 +0,0 @@ -Fixed a crash when importing a class decorator that did not exist with the same name than a class attribute after the class definition. - -Closes #10105 diff --git a/doc/whatsnew/fragments/10161.false_positive b/doc/whatsnew/fragments/10161.false_positive deleted file mode 100644 index dc343e05ae..0000000000 --- a/doc/whatsnew/fragments/10161.false_positive +++ /dev/null @@ -1,3 +0,0 @@ -Comparisons between two calls to `type()` won't raise an ``unidiomatic-typecheck`` warning anymore, consistent with the behavior applied only for ``==`` previously. - -Closes #10161 diff --git a/doc/whatsnew/fragments/10277.other b/doc/whatsnew/fragments/10277.other deleted file mode 100644 index a7a1bfb0b2..0000000000 --- a/doc/whatsnew/fragments/10277.other +++ /dev/null @@ -1,4 +0,0 @@ -The algorithm used for ``no-member`` suggestions is now more efficient and cut the -calculation when the distance score is already above the threshold. - -Refs #10277 diff --git a/doc/whatsnew/fragments/10282.bugfix b/doc/whatsnew/fragments/10282.bugfix deleted file mode 100644 index 42f75bf0ee..0000000000 --- a/doc/whatsnew/fragments/10282.bugfix +++ /dev/null @@ -1,3 +0,0 @@ -Fix a crash caused by malformed format strings when using `.format` with keyword arguments. - -Closes #10282 diff --git a/doc/whatsnew/fragments/10334.bugfix b/doc/whatsnew/fragments/10334.bugfix deleted file mode 100644 index 6c2a24a748..0000000000 --- a/doc/whatsnew/fragments/10334.bugfix +++ /dev/null @@ -1,3 +0,0 @@ -Using a slice as a class decorator now raise a 'not-callable' message instead of crashing pylint. A lot of checks that dealt with decorators (too many to list) are now shortcut if the decorator can't immediately be inferred to a function or class definition. - -Closes #10334 diff --git a/examples/pylintrc b/examples/pylintrc index a50908c367..8c7580fd0c 100644 --- a/examples/pylintrc +++ b/examples/pylintrc @@ -495,10 +495,10 @@ evaluation=max(0, 0 if fatal else 10.0 - ((float(5 * error + warning + refactor # used to format the message information. See doc for all details. msg-template= -# Set the output format. Available formats are: text, parseable, colorized, -# json2 (improved json format), json (old json format) and msvs (visual -# studio). You can also give a reporter class, e.g. -# mypackage.mymodule.MyReporterClass. +# Set the output format. Available formats are: 'text', 'parseable', +# 'colorized', 'json2' (improved json format), 'json' (old json format), msvs +# (visual studio) and 'github' (GitHub actions). You can also give a reporter +# class, e.g. mypackage.mymodule.MyReporterClass. #output-format= # Tells whether to display a full report or only the messages. diff --git a/examples/pyproject.toml b/examples/pyproject.toml index b342ed2536..33df0cafc5 100644 --- a/examples/pyproject.toml +++ b/examples/pyproject.toml @@ -438,9 +438,10 @@ evaluation = "max(0, 0 if fatal else 10.0 - ((float(5 * error + warning + refact # used to format the message information. See doc for all details. # msg-template = -# Set the output format. Available formats are: text, parseable, colorized, json2 -# (improved json format), json (old json format) and msvs (visual studio). You -# can also give a reporter class, e.g. mypackage.mymodule.MyReporterClass. +# Set the output format. Available formats are: 'text', 'parseable', 'colorized', +# 'json2' (improved json format), 'json' (old json format), msvs (visual studio) +# and 'github' (GitHub actions). You can also give a reporter class, e.g. +# mypackage.mymodule.MyReporterClass. # output-format = # Tells whether to display a full report or only the messages. diff --git a/pylint/__pkginfo__.py b/pylint/__pkginfo__.py index a6f117f4c9..6d9fccb5bd 100644 --- a/pylint/__pkginfo__.py +++ b/pylint/__pkginfo__.py @@ -9,7 +9,7 @@ from __future__ import annotations -__version__ = "3.3.6" +__version__ = "3.3.7" def get_numversion_from_version(v: str) -> tuple[int, int, int]: diff --git a/tbump.toml b/tbump.toml index c83b9d67b5..5da7f7ef37 100644 --- a/tbump.toml +++ b/tbump.toml @@ -1,7 +1,7 @@ github_url = "https://github.com/pylint-dev/pylint" [version] -current = "3.3.6" +current = "3.3.7" regex = ''' ^(?P0|[1-9]\d*) \. diff --git a/towncrier.toml b/towncrier.toml index 95c89ef963..a497b544e9 100644 --- a/towncrier.toml +++ b/towncrier.toml @@ -1,5 +1,5 @@ [tool.towncrier] -version = "3.3.6" +version = "3.3.7" directory = "doc/whatsnew/fragments" filename = "doc/whatsnew/3/3.3/index.rst" template = "doc/whatsnew/fragments/_template.rst" From 9ab8c6beec6cdde64f86df756eb91f2dbb61458d Mon Sep 17 00:00:00 2001 From: Jacob Walls Date: Sun, 4 May 2025 11:44:08 -0400 Subject: [PATCH 2/2] Apply suggestions from code review --- doc/whatsnew/3/3.3/index.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/whatsnew/3/3.3/index.rst b/doc/whatsnew/3/3.3/index.rst index e6cc05ea3f..29c4834c0a 100644 --- a/doc/whatsnew/3/3.3/index.rst +++ b/doc/whatsnew/3/3.3/index.rst @@ -31,7 +31,7 @@ False Positives Fixed Other Bug Fixes --------------- -- Fixed a crash when importing a class decorator that did not exist with the same name than a class attribute after the class definition. +- Fixed a crash when importing a class decorator that did not exist with the same name as a class attribute after the class definition. Closes #10105 (`#10105 `_) @@ -39,7 +39,7 @@ Other Bug Fixes Closes #10282 (`#10282 `_) -- Using a slice as a class decorator now raise a 'not-callable' message instead of crashing pylint. A lot of checks that dealt with decorators (too many to list) are now shortcut if the decorator can't immediately be inferred to a function or class definition. +- Using a slice as a class decorator now raises a ``not-callable`` message instead of crashing. A lot of checks that dealt with decorators (too many to list) are now shortcut if the decorator can't immediately be inferred to a function or class definition. Closes #10334 (`#10334 `_) @@ -48,7 +48,7 @@ Other Bug Fixes Other Changes ------------- -- The algorithm used for ``no-member`` suggestions is now more efficient and cut the +- The algorithm used for ``no-member`` suggestions is now more efficient and cuts the calculation when the distance score is already above the threshold. Refs #10277 (`#10277 `_)