pypi / pylint
pylint
What changed in pylint 4, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-21.
2 breaking1 deprecations39 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initpylint 442 changes
Breaking changes 2
Using several output formats that all write to stdout now raises an error instead of printing every message more than once.
Overload stubs in subclasses are no longer compared to the overridden method; methods with overloads are compared through their implementation instead of their first stub.
Deprecations 1
Explicitly passing confidence=None to add_message, add_ignored_message, or Message emits a DeprecationWarning and will raise an error in pylint 5.0.
Fixes and other changes 39
Overload stubs in subclasses are no longer compared to the overridden method; methods with overloads are compared through their implementation instead of their first stub.
No longer reports this false positive when an attribute is assigned inside the setter of an old-style property(fget, fset) call.
The checker is disabled when min-similarity-lines is set to 0, as documented, and no longer crashes.
The difference column now shows the change since the previous run instead of repeating the previous count.
Allows the __main__ module name in camelCase, PascalCase, and UPPER_CASE naming styles without reporting this message.
No longer reports false positives for module-level all-caps aliases that preserve the name of an external callable.
The difference column now shows the change since the previous run instead of repeating the previous count.
No longer suggests a non-equivalent rewrite when an inner min or max call has multiple arguments.
Comprehensions inside branches that cannot run are no longer checked for missing members.
Calls to functions whose bodies contain only an ellipsis are no longer inferred as returning None, preventing false positives on their results.
Calls to functions whose bodies contain only an ellipsis are no longer inferred as returning None, preventing false positives on their results.
Calls to functions whose bodies contain only an ellipsis are no longer inferred as returning None, preventing false positives on their results.
No longer reports this false positive when a lambda uses its parameters, including from a nested lambda, and that name is assigned later in the module.
No longer reports a false positive when a subclass of a subscripted generic base accesses a protected member through that base.
No longer crashes when a diagram includes a class created by namedtuple or an argparse.Namespace.
Avoids hanging or crashing with RecursionError when --all-associated follows an attribute whose inferred class is rebuilt by astroid on every inference.
No longer warns for method parameters that retain a built-in name from an overridden method.
No longer emits this message when the bare _ variable is reused to discard values of different types.
No longer reports this false positive in .pyi stub files where __init__ bodies are ellipses.
Fixes an IndexError crash when an Enum class defines an __init__ method without arguments.
No longer reports this false positive when a decorator returning its argument unchanged is stacked above a decorator accepting **kwargs.
No longer reports a false positive for an ellipsis-only Protocol method inside a conditional block such as if TYPE_CHECKING.
No longer reports a false positive when negating a comparison between instances of a set or frozenset subclass.
Calls to functions whose bodies contain only an ellipsis are no longer inferred as returning None, preventing false positives on their results.
Does not emit this message for a yield immediately after raise or sys.exit() when the yield marks a function as a generator.
No longer reports unused arguments in .pyi stub files where function bodies are ellipses.
No longer reports a name used by a later target of the same assignment as used before assignment.
No longer reports a name bound by a tuple or list target of a with item as used before assignment when used by a later item in the same with statement.
No longer reports a name assigned in a comprehension condition as used before assignment when it is used in the element.
No longer reports this false positive when a keyword-only parameter is passed to the parent under the same keyword with a different value.
No longer reports a false positive for a line-too-long suppression when a # inside a string literal precedes the pylint comment.
Fixes a crash when the class of a called attribute cannot be fully inferred, including when the attribute is a with-statement target or appears inside a comprehension.
Fixes a crash when calling __bases__ on a class.
Passing confidence=None to add_message, add_ignored_message, or Message is accepted again and means UNDEFINED.
Fixes a crash when a name bound by a type statement (a TypeVar) is used in a with statement.
Fixes a false positive when unpacking a tuple concatenation whose elements have several possible values.
Fixes a crash in this check when import final is used.
Fixes a TypeError when checking a class whose metaclass name binding has no line number.
Pylint 4.1.1 is the first 4.1 release available on PyPI after 4.1.0 required an unreleased dill version on Python 3.15.