Bump pylint to 3.0.3, update changelog #9293
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What's new in Pylint 3.0.3?
Release date: 2023-12-11
False Positives Fixed
Fixed false positive for
unnecessary-lambda
when the call has keyword arguments but not the lambda.Closes False positive:
unnecessary lambda
with kwargs in the call #9148Fixed incorrect suggestion for shallow copy in unnecessary-comprehension
Example of the suggestion:
#pylint: disable=missing-module-docstring
a = [1, 2, 3]
b = [x for x in a]
b[0] = 0
print(a) # [1, 2, 3]
After changing b = [x for x in a] to b = a based on the suggestion, the script now prints [0, 2, 3]. The correct suggestion should be use list(a) to preserve the original behavior.
Closes fix unnecessary-comprehension provides incorrect suggestion #9172
Fix false positives for
undefined-variable
andunused-argument
forclasses and functions using Python 3.12 generic type syntax.
Closes Undefined variable when using generic type parameters (PEP695) #9193
Fixed
pointless-string-statement
false positive for docstringson Python 3.12 type aliases.
Closes Invalid
pointless-string-statement
for docstrings for Python 3.12 type-aliases (PEP 695) #9268Fix false positive for
invalid-exception-operation
when concatenating tuplesof exception types.
Closes wrong-exception-operation raised when concat tuple in except #9288
Other Bug Fixes
Fix a bug where pylint was unable to walk recursively through a directory if the
directory has an
__init__.py
file.Closes --recursive fail to parse folder with __init__.py at the root when using relative path #9210