Update dependency pylint to v4.0.6#354
Open
renovate[bot] wants to merge 1 commit into
Open
Conversation
22a3469 to
7f60947
Compare
7f60947 to
4bf4a33
Compare
4bf4a33 to
21c0ab2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR contains the following updates:
4.0.4→4.0.6Release Notes
pylint-dev/pylint (pylint)
v4.0.6Compare Source
What's new in Pylint 4.0.6?
Release date: 2026-06-14
False Positives Fixed
implicit-str-concatis no longer emitted for an implicit concatenation ofa raw string with a non-raw one (e.g.
r"\d" "\n"). Such literals cannot bemerged into a single string, so the concatenation is intentional rather than a
forgotten comma.
Closes #6663
Fix a false positive for
invalid-name(C0103) where the defaulttypevar-rgxrejectedTypeVarnames containing digits, such asEc2T.Closes #8499
Fix a false positive for
too-many-argumentsin (non-static) methods and classmethods.Closes #8675
Fix a false positive for
no-memberwhen a value is inferred to severalpossible types and at least one of them defines a dynamic
__getattr__.Closes #9833
Fix a false positive for
function-redefined(E0102) when reusing names thatmatch
dummy-variables-rgx(such as_), which is common forpytest-bddstep definitions. This restores the behavior from before pylint4.0.0; as a consequence the false negative fixed in #9894 is reintroduced for
functions whose name matches
dummy-variables-rgx.Closes #10665
Fix
undefined-variablefalse positive when a name used as ametaclassargument in a nested class is referenced again later in the module.
Closes #10823
Fix a false positive for
unused-variablewhere global variables matchingdummy-variables-rgxwere still reported as unused whenallow-global-unused-variableswas disabled.Closes #10890
Fix a false positive for
bad-dunder-namewhen there is a user-defined__suppress_context__attribute on exception subclasses.Closes #10960
Fix
used-before-assignmentfalse positive for names bound byfrom X import *in every branch of anif/elif/elsechain.Refs #10980
Check for metaclass call signature when evaluating arguments of a class call.
Closes #11032
Fix false positive
method-hiddenwhencached_propertyis imported directly withfrom functools import cached_property.Refs #11037
Other Bug Fixes
Fix the suggestion of
unnecessary-comprehensionfor a dict comprehensionthat iterates a dict directly, e.g.
{a: b for a, b in d}. Iterating a dictyields its keys, so the suggestion is now
dict(d.keys())instead of theincorrect
dict(d), which would simply copyd.Closes #8256
Fix a crash in
consider-using-enumeratewhen theforloop target is an attribute (e.g.for self.idx in range(len(x))) rather than a simple variable name.Closes #10099
Fix crash when checking
attribute-defined-outside-initon classes that inherit from a base class pylint cannot fully analyze.Closes #10892
Fix
add_messagesilently overwriting an explicitcol_offset=0(or any other zero-valuedline/end_lineno/end_col_offset) with the AST node's value. The internal_add_one_messagehelper used a falsey check (if not col_offset:) to detect an omitted argument, which incorrectly treated a legitimate0the same asNone. It now uses an identity check againstNone.Refs #11020
Fix a crash in the name checker when a non-constant value is passed as the
covariantorcontravariantargument of aTypeVar.Closes #11022
Fix a crash in the variable checker when a name resolves to a dataclass-synthesized
__init__, which has no line number.Closes #11023
Fix a crash in the variables checker when
NotImplementedis used as the test of anifstatement, which raised aTypeErrorin a boolean context on Python 3.14.Closes #11025
Avoided a crash from the implicit booleaness checker for
len()calls without arguments.Closes #11028
Fix a crash in the variables checker when a class declares a metaclass whose
attribute-access chain does not bottom out at a name (e.g.
class C(metaclass=None._)).Originally reported as
pylint-dev/astroid#3066.Refs #11031
Fix a crash in the name checker when a chained assignment of a
TypeAliasvalue has a non-name target such as a
Subscript(for examplea[0] = b = TypeAlias).Closes #11056
Fix a crash in the deprecated checker when
__import__is called with anon-string constant argument (for example
__import__(1)).Closes #11059
Avoid crashing when enum member inference fails while checking enum subclasses.
Closes #11069
Prevent a crash in
unexpected-keyword-arganalysis wheninfer_call_result()raisesInferenceErrorwhile inspectingdecorator return signatures.
Closes #11070
Fix a crash in the typecheck checker when a class uses a non-class object
(for example a function) as its
metaclass=argument.Closes #11071
Allow digits in ParamSpec and TypeVarTuple names for
invalid-namecheck.The default
paramspec-rgxandtypevartuple-rgxpatterns rejected namescontaining digits (e.g.
Ec2P,S3Ts), emitting a falseinvalid-name(C0103). Allow digits in the lowercase segments, consistent with the
typevarandtypealiaspatterns.Closes #11090
Performance Improvements
The duplicate-code checker no longer runs when its message (R0801) is disabled, even if
reports=yesis set. Previously, the checker's report (RP0801) would cause the expensive similarity computation to run regardless.Closes #3443
v4.0.5Compare Source
What's new in Pylint 4.0.5?
Release date: 2026-02-20
False Positives Fixed
Fix possibly-used-before-assignment false positive when using self.fail() in tests.
Closes #10743
Fixed false positive for
logging-unsupported-formatwhen no arguments are provided to logging functions.According to Python's logging documentation, no formatting is performed when no arguments are supplied, so strings like
logging.error("%test")are valid.Closes #10752
Fix a false positive for
invalid-namewhere a dataclass field typed withFinalwas evaluated against the
class_constregex instead of theclass_attributeregex.Closes #10790
Avoid emitting
unspecified-encoding(W1514) whenpy-versionis 3.15+.Refs #10791
Other Bug Fixes
Fix
--known_third_partyconfig being ignored.Closes #10801
Fixed dynamic color mapping for "fail-on" messages when using multiple reporter/output formats.
Closes #10825
dependency on isort is now set to <9, permitting to use isort 8.
Closes #10857
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.