Note: The pre-commit manager in Renovate is not supported by the pre-commit maintainers or community. Please do not report any problems there, instead create a Discussion in the Renovate repository if you have any questions.
Fix a false positive for invalid-name when a module-level variable is assigned
an instance of a TypedDict subclass. Such a name is a value, not a type
definition, so it is now checked against the constant or variable regex instead
of class-rgx.
Fix a crash in the not-context-manager and not-async-context-manager
checks when the context manager infers to a value without a name, such as the
slice returned by with slice(...) / async with slice(...).
Fix a false positive for nested-min-max (W3301) when the inner min/max call carries a keyword argument such as key=. Flattening the call dropped the keyword and changed the result, so nested calls whose inner call has keyword arguments are no longer flagged.
Fix a false suggestion from nested-min-max (W3301): when rewriting a nested min/max into a splat call, arguments positioned after the splatted call were silently dropped, so the suggested code changed the result.
Fix a false positive for too-many-locals (R0914): PEP 695 type parameters, i.e. the T1 and T2 in a generic def f[T1, T2] signature, were counted as local variables. They are type-system constructs, not runtime locals, and are now excluded from the local-variable count.
Fix literal-comparison (R0123) emitting a corrupted suggestion for identifiers
that contain is (e.g. axis is 5 was rendered ax== == 5). The suggestion
is now rebuilt from the operands and operator.
Fix false positives in bad-string-format-type (E1307) for valid % formatting:
%i/%u applied to a float (both truncate like %d) and %a applied to any
non-int type (%a is type-agnostic like %s/%r).
too-many-lines could be reported at the line of a # pylint: disable=too-many-lines
pragma found in a previously linted module. Pragma positions are now reset between
modules, so the message is reported at line 1 (or at the current module's own pragma)
regardless of which files were linted before.
Fix a false positive for invalid-name when a module-level variable is assigned
an instance of a TypedDict subclass. Such a name is a value, not a type
definition, so it is now checked against the constant or variable regex instead
of class-rgx.
Fix a crash in the not-context-manager and not-async-context-manager
checks when the context manager infers to a value without a name, such as the
slice returned by with slice(...) / async with slice(...).
Fix a false positive for nested-min-max (W3301) when the inner min/max call carries a keyword argument such as key=. Flattening the call dropped the keyword and changed the result, so nested calls whose inner call has keyword arguments are no longer flagged.
Fix a false suggestion from nested-min-max (W3301): when rewriting a nested min/max into a splat call, arguments positioned after the splatted call were silently dropped, so the suggested code changed the result.
Fix a false positive for too-many-locals (R0914): PEP 695 type parameters, i.e. the T1 and T2 in a generic def f[T1, T2] signature, were counted as local variables. They are type-system constructs, not runtime locals, and are now excluded from the local-variable count.
Fix literal-comparison (R0123) emitting a corrupted suggestion for identifiers
that contain is (e.g. axis is 5 was rendered ax== == 5). The suggestion
is now rebuilt from the operands and operator.
Fix false positives in bad-string-format-type (E1307) for valid % formatting:
%i/%u applied to a float (both truncate like %d) and %a applied to any
non-int type (%a is type-agnostic like %s/%r).
too-many-lines could be reported at the line of a # pylint: disable=too-many-lines
pragma found in a previously linted module. Pragma positions are now reset between
modules, so the message is reported at line 1 (or at the current module's own pragma)
regardless of which files were linted before.
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
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:
Note: The pre-commit manager in Renovate is not supported by the pre-commit maintainers or community. Please do not report any problems there, instead create a Discussion in the Renovate repository if you have any questions.
Release Notes
PyCQA/pylint (PyCQA/pylint)v4.0.7
Compare Source
What's new in Pylint 4.0.7?
Release date: 2026-08-09
False Positives Fixed
Fix a false positive for invalid-name when a module-level variable is assigned
an instance of a TypedDict subclass. Such a name is a value, not a type
definition, so it is now checked against the constant or variable regex instead
of class-rgx.
Closes #11231
Other Bug Fixes
-
-
-
-
-
-
-
-
-
-
-
pylint-dev/pylint (pylint)Fix a crash in the bad-open-mode check when the mode argument of
open is the NotImplemented constant (Python >= 3.14).
Closes #11099
Fix a crash in the not-context-manager and not-async-context-manager
checks when the context manager infers to a value without a name, such as the
slice returned by with slice(...) / async with slice(...).
Closes #11102
Fix a false positive for nested-min-max (W3301) when the inner min/max call carries a keyword argument such as key=. Flattening the call dropped the keyword and changed the result, so nested calls whose inner call has keyword arguments are no longer flagged.
Closes #11130
Fix a false suggestion from nested-min-max (W3301): when rewriting a nested min/max into a splat call, arguments positioned after the splatted call were silently dropped, so the suggested code changed the result.
Closes #11134
Fix a false positive for too-many-locals (R0914): PEP 695 type parameters, i.e. the T1 and T2 in a generic def f[T1, T2] signature, were counted as local variables. They are type-system constructs, not runtime locals, and are now excluded from the local-variable count.
Closes #11136
Fix literal-comparison (R0123) emitting a corrupted suggestion for identifiers
that contain is (e.g. axis is 5 was rendered ax== == 5). The suggestion
is now rebuilt from the operands and operator.
Closes #11146
Fix false positives in bad-string-format-type (E1307) for valid % formatting:
%i/%u applied to a float (both truncate like %d) and %a applied to any
non-int type (%a is type-agnostic like %s/%r).
Closes #11147
Fix a false positive for :ref:useless-parent-delegation when an override changes
the default value of a positional-only parameter.
Closes #11148
Fixed a crash in comparison-with-callable when comparing a lambda assigned as a class attribute.
Closes #11175
too-many-lines could be reported at the line of a # pylint: disable=too-many-lines
pragma found in a previously linted module. Pragma positions are now reset between
modules, so the message is reported at line 1 (or at the current module's own pragma)
regardless of which files were linted before.
Refs #11191
Fix a crash when a call unpacks a dictionary whose keys are not string
constants, e.g. copy.copy(**{-1: 1}).
Closes #11222
v4.0.7
Compare Source
What's new in Pylint 4.0.7?
Release date: 2026-08-09
False Positives Fixed
Fix a false positive for invalid-name when a module-level variable is assigned
an instance of a TypedDict subclass. Such a name is a value, not a type
definition, so it is now checked against the constant or variable regex instead
of class-rgx.
Closes #11231
Other Bug Fixes
Fix a crash in the bad-open-mode check when the mode argument of
open is the NotImplemented constant (Python >= 3.14).
Closes #11099
Fix a crash in the not-context-manager and not-async-context-manager
checks when the context manager infers to a value without a name, such as the
slice returned by with slice(...) / async with slice(...).
Closes #11102
Fix a false positive for nested-min-max (W3301) when the inner min/max call carries a keyword argument such as key=. Flattening the call dropped the keyword and changed the result, so nested calls whose inner call has keyword arguments are no longer flagged.
Closes #11130
Fix a false suggestion from nested-min-max (W3301): when rewriting a nested min/max into a splat call, arguments positioned after the splatted call were silently dropped, so the suggested code changed the result.
Closes #11134
Fix a false positive for too-many-locals (R0914): PEP 695 type parameters, i.e. the T1 and T2 in a generic def f[T1, T2] signature, were counted as local variables. They are type-system constructs, not runtime locals, and are now excluded from the local-variable count.
Closes #11136
Fix literal-comparison (R0123) emitting a corrupted suggestion for identifiers
that contain is (e.g. axis is 5 was rendered ax== == 5). The suggestion
is now rebuilt from the operands and operator.
Closes #11146
Fix false positives in bad-string-format-type (E1307) for valid % formatting:
%i/%u applied to a float (both truncate like %d) and %a applied to any
non-int type (%a is type-agnostic like %s/%r).
Closes #11147
Fix a false positive for :ref:useless-parent-delegation when an override changes
the default value of a positional-only parameter.
Closes #11148
Fixed a crash in comparison-with-callable when comparing a lambda assigned as a class attribute.
Closes #11175
too-many-lines could be reported at the line of a # pylint: disable=too-many-lines
pragma found in a previously linted module. Pragma positions are now reset between
modules, so the message is reported at line 1 (or at the current module's own pragma)
regardless of which files were linted before.
Refs #11191
Fix a crash when a call unpacks a dictionary whose keys are not string
constants, e.g. copy.copy(**{-1: 1}).
Closes #11222
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR was generated by Mend Renovate. View the repository job log.