unstale

pypi / pylint

pylint

What changed in pylint 3 to 4, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-29.

79 breaking1 security2 deprecations33 new APIs and options4 performance29 behavior and defaults7 tooling156 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.3.1 on npm

pylint 4239 changes

Breaking changes 35

  • Using several output formats that all write to stdout now raises an error instead of printing every message more than once.

    4.1.3release notes

  • 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.

    4.1.3release notes

  • A class is considered abstract only when it opts in explicitly through ABC inheritance, ABCMeta, a class-defined abstractmethod, or Protocol.

    4.1.0release notes

  • The check now reports overridden special methods with a different number of parameters, with stated exceptions for renamed parameters, removed variadics, and constructor-family methods.

    4.1.0release notes

  • The check now reports attributes assigned with setattr outside defining methods, while not reporting attributes initialized with setattr by a defining method in the class or a parent.

    4.1.0release notes

  • The parameter is no longer nullable on APIs except is_message_enabled, where None means not to filter by confidence; its default is interfaces.UNDEFINED.

    4.1.0release notes

  • The check no longer misses NumPy-style parameters whose type line includes a default value.

    4.1.0release notes

  • The check now reports calls that unpack a dictionary literal with ** when the dictionary omits a required argument.

    4.1.0release notes

  • Repeated output-format options now write reports to every requested file instead of only the last one.

    4.1.0release notes

  • Recursive file discovery no longer walks ignored directories or packages already found, and visits directories and files in sorted order.

    4.1.0release notes

  • A hidden method is no longer treated as excused merely because it shares a name with a builtin or module-level function; only ancestor-class members can excuse it.

    4.0.9release notes

  • Now flags assertEqual and assertNotEqual when both compared values are constants.

    4.0.8release notes

  • Module-level variables assigned an instance of a TypedDict subclass are checked against the constant or variable regex instead of class-rgx.

    4.0.7release notes

  • Pragma positions are reset between modules, so the message reports at line 1 or the current module's own pragma regardless of previously linted files.

    4.0.7release notes

  • Restores the behavior from before Pylint 4.0.0 for reused names matching `dummy-variables-rgx`; a previously fixed false negative is reintroduced for such function names.

    4.0.6release notes

  • Enums created with the Enum() functional syntax are now checked against --class-rgx for invalid-name, like other enums.

    4.0.1release notes

  • The required astroid version is now 4.0.0.

    4.0.0release notesrelease notes

  • The async checker module was renamed from async.py so it can be imported directly and support extensibility.

    4.0.0release notes

  • Emits an error when a name capture pattern in a match statement makes the remaining patterns unreachable.

    4.0.0release notes

  • Its message ID changed from E0116 to W0136, and the warning is now emitted for every Python version.

    4.0.0release notes

  • The check now reports redefined functions with a leading underscore.

    4.0.0release notes

  • Reassigned module-level constants are treated as variables and checked against --variable-rgx; exclusive assignments continue to use the constant regex.

    4.0.0release notes

  • Module-level lists, sets, and objects can match either naming regex, even when reassigned, and are no longer skipped.

    4.0.0release notes

  • Module-level constants with type annotations are now checked.

    4.0.0release notes

  • The required isort version is now >=5.0.0, and compatibility for older versions through IsortDriver was removed.

    4.0.0release notes

  • The check now reports format strings with interpolation placeholders but no arguments.

    4.0.0release notes

  • Match cases now count as edges and increase complexity accordingly.

    4.0.0release notes

  • The nan-comparison checker no longer recognizes the nmp.NaN alias; use np or numpy instead.

    4.0.0release notes

  • Fixes a false negative for conditionally defined variables later assigned to a type-annotated variable.

    4.0.0release notes

  • UML relationships now reflect ownership semantics: annotations without assignment are associations, parameter assignments are aggregations, and instantiation is composition.

    4.0.0release notes

  • Pylint can no longer be launched with Python 3.9, though it can still lint code targeting that version with --py-version=3.9.

    4.0.0release notes

  • pyreverse Run no longer exits during initialization; call Run(args).run() to get the exit code.

    4.0.0release notes

  • The option was removed because pylint always emits user-friendly hints; remove it from configuration.

    4.0.0release notes

  • Match cases are now counted by the check.

    4.0.0release notes

  • The check now reports imports referenced in a preceding global statement.

    4.0.0release notes

Security 1

  • The result cache is stored as JSON instead of pickle, preventing crafted cache files from executing code when accessed.

    4.0.9release notessecurity advisory

Deprecations 2

  • Explicitly passing confidence=None to add_message, add_ignored_message, or Message emits a DeprecationWarning and will raise an error in pylint 5.0.

    4.1.2release notes

  • The unused pylintrc argument is deprecated and will be removed.

    4.0.0release notes

New APIs and options 24

  • The message names the callable that does not return anything and can suggest an equivalent function for configured known-side-effects-only-functions.

    4.1.0release notes

  • New check flags cycles of weak inequalities that can be simplified to equalities.

    4.1.0release notes

  • Files to lint can be set in configuration files or on the command line, allowing pylint to run with only the pylint command.

    4.1.0release notes

  • The environment variable is respected when selecting text or colorized stdout output; it takes precedence over --output-format, but not NO_COLOR.

    4.1.0release notes

  • Allows ignoring specific parts of a line when checking line length.

    4.1.0release notes

  • New check flags chains of numeric comparisons whose boolean condition is logically contradictory and can never be true.

    4.1.0release notes

  • A built-in output format produces JUnit-compatible XML for CI/CD integration.

    4.1.0release notes

  • Adds first-party import classification support similar to --known-third-party.

    4.1.0release notes

  • New check detects an iterator from an outer scope being consumed in a nested loop, which can unexpectedly exhaust it.

    4.1.0release notes

  • The MSG_STATE_* integer constants were replaced by an IntEnum; the old names remain as deprecated aliases.

    4.1.0release notes

  • pyreverse can show method names without parameter lists or return type annotations in class diagrams.

    4.1.0release notes

  • New check reports PEP 798 comprehension unpacking when py-version includes a Python version that cannot compile it.

    4.1.0release notes

  • Detects async context managers used with regular with statements instead of async with.

    4.0.0release notes

  • Adds a warning for break inside a finally clause, which raises a syntax warning in Python 3.14.

    4.0.0release notes

  • Enables the fixme check to search docstrings as well as comments.

    4.0.0release notes

  • The code_style extension adds a check recommending math.inf and math.nan over float calls, which are slower and not well typed with mypy.

    4.0.0release notes

  • Reports when object.__match_args__ is not a tuple of strings.

    4.0.0release notes

  • Reports binding a name to self instead of using an as pattern.

    4.0.0release notes

  • Reports positional attributes in class patterns when keywords could be used.

    4.0.0release notes

  • A checker was added to detect name-capture patterns that make remaining match patterns unreachable.

    4.0.0release notes

  • pyreverse can limit diagram complexity by controlling the displayed depth of packages and classes.

    4.0.0release notes

  • Reports multiple sub-patterns for the same attribute in class patterns.

    4.0.0release notes

  • A naming style was added that aligns with the TypeVar style.

    4.0.0release notes

  • Reports class patterns with more positional sub-patterns than object.__match_args__ specifies.

    4.0.0release notes

Performance 4

  • The checker reuses parsed ASTs, uses rolling-hash caching, and avoids quadratic blow-ups, reducing runtime and memory use on larger codebases.

    4.1.0release notes

  • Lazy imports reduce startup time by about 25%.

    4.1.0release notes

  • The duplicate-code analysis optimizations also reduce memory use and improve performance for larger codebases.

    4.1.0release notes

  • The checker no longer runs its expensive similarity computation when its message is disabled, even if `reports=yes` is set.

    4.0.6release notes

Behavior and default changes 20

  • Includes plugins specified with --load-plugins or --enable-all-extensions in generated configuration.

    4.1.4release notes

  • The check now catches additional simplifiable patterns and includes the suggested simplification in its message.

    4.1.0release notes

  • The check now detects repeated attribute chains such as object.attribute == object.attribute.

    4.1.0release notes

  • A line is no longer flagged solely because its trailing pragma is a common type-checker, noqa, or coverage pragma.

    4.1.0release notes

  • The check recognizes math.nan, numpy.nan, Decimal("nan"), and inferable NaN constants; meaningful infinity comparisons remain unreported.

    4.1.0release notes

  • The environment variable is respected when selecting text or colorized stdout output; it takes precedence over FORCE_COLOR and --output-format.

    4.1.0release notes

  • The check now reports superfluous parentheses around a single string or number literal after in, while leaving tuples and larger expressions alone.

    4.1.0release notes

  • Common tooling pragmas no longer count toward line length, preventing a line from being flagged solely because of a pragma.

    4.1.0release notes

  • The check now flags not (a is not b) and not (a not in b), which simplify to positive is and in comparisons.

    4.1.0release notes

  • Names assigned in an if __name__ == "__main__" block are accepted when they match either constant or variable naming style.

    4.0.8release notes

  • The default `paramspec-rgx` pattern now allows digits in lowercase segments of ParamSpec names.

    4.0.6release notes

  • The default pattern no longer rejects TypeVar names containing digits.

    4.0.6release notes

  • The default `typevartuple-rgx` pattern now allows digits in lowercase segments of TypeVarTuple names.

    4.0.6release notes

  • Does not emit this warning when py-version is 3.15 or later.

    4.0.5release notes

  • The list passed to this option now includes additional Enum dunder methods, so they can be recognized as valid dunder names.

    4.0.3release notes

  • Messages and categories configured as fail-on are colorized in red inverse.

    4.0.0release notes

  • Pypy 3.11 is now officially supported.

    4.0.0release notes

  • Colorized output is supported for MermaidJS and HTML output formats.

    4.0.0release notes

  • The checks distinguish comparisons in boolean contexts from those outside them to provide more accurate refactoring suggestions.

    4.0.0release notes

  • Verbose output now includes filenames of checked files.

    4.0.0release notes

Tooling 4

  • Includes plugins specified with --load-plugins or --enable-all-extensions in generated TOML configuration.

    4.1.4release notes

  • The message now includes a suggested dictionary literal for combining initialization and subsequent mutations into one statement.

    4.1.0release notes

  • Raises the supported upper bound so isort 9 can be installed alongside pylint.

    4.0.8release notes

  • Pylint now supports Python 3.14, including deferred annotation evaluation.

    4.0.0release notes

Fixes and other changes 149

  • Recognizes several special methods, including Python-version-specific methods, as valid dunder names.

    4.1.4release notes

  • Avoids suggesting a dictionary literal when an assignment references the dictionary being initialized.

    4.1.4release notes

  • Fixes a crash and incorrect package prefixes when linting packages whose parent implicit namespace package also exists in site-packages or the standard library.

    4.1.4release notes

  • Checkers loaded with this hook are no longer registered twice in worker processes, preventing duplicate messages when using multiple jobs.

    4.1.4release notes

  • Checkers loaded with this option are no longer registered twice in worker processes, preventing duplicate messages when using multiple jobs.

    4.1.4release notes

  • Fixes a crash when a logging call uses a bytes format string that is not valid UTF-8.

    4.1.4release notes

  • Avoids a false positive when a decorated method is inferred as a property.

    4.1.4release notes

  • Reports a clear error for unknown class or module targets, omitted module names when analyzing multiple modules, and targets known not to be classes.

    4.1.4release notes

  • Fixes an AssertionError when accessing an attribute on an Enum exception instance.

    4.1.4release notes

  • Avoids a false positive for an annotated name assigned with a walrus operator in a multiline comprehension condition.

    4.1.4release notes

  • Avoids a false positive when a terminating call occurs inside a compound expression in a lambda body.

    4.1.4release notes

  • Fixes a crash for indexed split calls in loops with certain assignment targets and recognizes index-variable reassignment through tuple unpacking or a walrus operator.

    4.1.4release notes

  • Avoids a false positive when a later method or nested class shadows a module-level or builtin name used in a class body.

    4.1.4release notes

  • Avoids a false positive when testing a method or function with an unknown or class decorator.

    4.1.4release notes

  • 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.

    4.1.3release notes

  • No longer reports this false positive when an attribute is assigned inside the setter of an old-style property(fget, fset) call.

    4.1.3release notes

  • The checker is disabled when min-similarity-lines is set to 0, as documented, and no longer crashes.

    4.1.3release notes

  • Allows the __main__ module name in camelCase, PascalCase, and UPPER_CASE naming styles without reporting this message.

    4.1.3release notes

  • No longer reports false positives for module-level all-caps aliases that preserve the name of an external callable.

    4.1.3release notes

  • The difference column now shows the change since the previous run instead of repeating the previous count.

    4.1.3release notes

  • No longer suggests a non-equivalent rewrite when an inner min or max call has multiple arguments.

    4.1.3release notes

  • Comprehensions inside branches that cannot run are no longer checked for missing members.

    4.1.3release notes

  • Calls to functions whose bodies contain only an ellipsis are no longer inferred as returning None, preventing false positives on their results.

    4.1.3release notes

  • 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.

    4.1.3release notes

  • No longer reports a false positive when a subclass of a subscripted generic base accesses a protected member through that base.

    4.1.3release notes

  • No longer crashes when a diagram includes a class created by namedtuple or an argparse.Namespace.

    4.1.3release notes

  • Avoids hanging or crashing with RecursionError when --all-associated follows an attribute whose inferred class is rebuilt by astroid on every inference.

    4.1.3release notes

  • No longer warns for method parameters that retain a built-in name from an overridden method.

    4.1.3release notes

  • No longer emits this message when the bare _ variable is reused to discard values of different types.

    4.1.3release notes

  • No longer reports this false positive in .pyi stub files where __init__ bodies are ellipses.

    4.1.3release notes

  • Fixes an IndexError crash when an Enum class defines an __init__ method without arguments.

    4.1.3release notes

  • No longer reports this false positive when a decorator returning its argument unchanged is stacked above a decorator accepting **kwargs.

    4.1.3release notes

  • No longer reports a false positive for an ellipsis-only Protocol method inside a conditional block such as if TYPE_CHECKING.

    4.1.3release notes

  • No longer reports a false positive when negating a comparison between instances of a set or frozenset subclass.

    4.1.3release notes

  • Does not emit this message for a yield immediately after raise or sys.exit() when the yield marks a function as a generator.

    4.1.3release notes

  • No longer reports unused arguments in .pyi stub files where function bodies are ellipses.

    4.1.3release notes

  • No longer reports a name used by a later target of the same assignment as used before assignment.

    4.1.3release notes

  • 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.

    4.1.3release notes

  • No longer reports a name assigned in a comprehension condition as used before assignment when it is used in the element.

    4.1.3release notes

  • No longer reports this false positive when a keyword-only parameter is passed to the parent under the same keyword with a different value.

    4.1.3release notes

  • No longer reports a false positive for a line-too-long suppression when a # inside a string literal precedes the pylint comment.

    4.1.3release notes

  • 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.

    4.1.2release notes

  • Fixes a crash when calling __bases__ on a class.

    4.1.2release notes

  • Passing confidence=None to add_message, add_ignored_message, or Message is accepted again and means UNDEFINED.

    4.1.2release notes

  • Fixes a crash when a name bound by a type statement (a TypeVar) is used in a with statement.

    4.1.2release notes

  • Fixes a false positive when unpacking a tuple concatenation whose elements have several possible values.

    4.1.2release notes

  • Fixes a crash in this check when import final is used.

    4.1.2release notes

  • Fixes a TypeError when checking a class whose metaclass name binding has no line number.

    4.1.2release notes

  • 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.

    4.1.1release notes

  • The check no longer emits a false positive for asynchronous list comprehensions that cannot be replaced with a generator expression.

    4.1.0release notes

  • Imports inside a recognized sys.version_info guard no longer emit this message.

    4.1.0release notes

  • Parallel runs no longer duplicate extension messages or ignore extensions enabled in the configuration; final message occurrence counts are also corrected.

    4.1.0release notes

  • The check no longer misses NumPy-style parameters whose type line includes a default value.

    4.1.0release notes

  • A classmethod annotated with typing.Self and overridden in a subclass now has its result narrowed to that subclass.

    4.1.0release notes

  • A protected member accessed through self.__class__ is now treated like an access through type(self).

    4.1.0release notes

  • PEP 798 comprehension unpacking no longer raises false positives, and Python 3.15 standard library deprecations are followed.

    4.1.0release notes

  • False positives for negated comparisons between dict views are fixed; the check also now flags negated is-not and not-in comparisons.

    4.1.0release notes

  • False positives for names bound in only some arms of an if/elif/else chain are fixed.

    4.1.0release notes

  • Prevents a TypeError crash when checking a for loop that iterates over a subscript with non-numeric constant bounds or a zero step.

    4.0.10release notes

  • Prevents an AttributeError crash for annotated assignments whose value is an attribute access on a call rooted at a non-Name node.

    4.0.10release notes

  • Avoids false positives when keyword-only arguments are passed through a non-literal **kwargs dictionary at the call site.

    4.0.10release notes

  • No longer reports imports inside mutually exclusive OS guard branches, matching existing behavior for sys.version_info guards.

    4.0.10release notes

  • Avoids false positives when a variable referenced in the called expression is assigned, reassigned, or deleted later in the same scope.

    4.0.10release notes

  • Avoids false positives in dataclass __new__ methods when arguments are consumed by a generated __init__ method.

    4.0.10release notes

  • Fixes a false positive when the bases of the class being raised from cannot be inferred.

    4.0.9release notes

  • Fixes a false positive when a class variable is annotated with ClassVar without an initial value.

    4.0.9release notes

  • Prevents a crash when a method shadows a builtin name bound to a node without a statement, such as help or license.

    4.0.9release notes

  • Prevents a crash in the checker when attribute lookup raises an InferenceError.

    4.0.9release notes

  • Fixes a false positive when a method uses self before a locally defined class or nested method.

    4.0.9release notes

  • Fixes a false positive when calling functions constructed with types.FunctionType or types.LambdaType.

    4.0.9release notes

  • Fixes a block-scoped disable directive inside an if body leaking into sibling elif or else blocks for line-scoped messages.

    4.0.9release notes

  • Prevents a crash when a Generator or AsyncGenerator subscript contains an empty tuple, such as Generator[()].

    4.0.9release notes

  • Avoids a false positive for a directly called lambda in a class body wrapping a comprehension with an assignment expression, where following the message would produce code that does not compile.

    4.0.9release notes

  • Fixes a false positive when an ellipsis is the sole body statement of a method defined on a Protocol.

    4.0.9release notes

  • Avoids false positives when formatting instances of int, float, or str subclasses, such as bool or an IntEnum member with %d.

    4.0.8release notes

  • Prevents a crash when a raised name does not infer to an exception, avoiding an astroid-error fatal message for the file.

    4.0.8release notes

  • Prevents a crash when a class has non-function attributes sharing the name of a property setter.

    4.0.8release notes

  • No longer reports a false positive when the returned value is an instance of a subclass of the expected builtin type.

    4.0.8release notes

  • Avoids a false positive when an open call uses a mode argument that cannot be inferred.

    4.0.8release notes

  • Prevents a crash when a loop target is a subscript, attribute, or tuple.

    4.0.8release notes

  • The check no longer crashes when open's mode argument is the NotImplemented constant on Python 3.14 or later.

    4.0.7release notes

  • Valid percent formatting with %i or %u applied to floats, and %a applied to non-integers, no longer produces false positives.

    4.0.7release notes

  • The check no longer crashes when comparing a lambda assigned as a class attribute.

    4.0.7release notes

  • Pylint no longer crashes when a call unpacks a dictionary whose keys are not string constants.

    4.0.7release notes

  • Suggestions for identifiers containing “is” are rebuilt from the operands and operator, avoiding corrupted output.

    4.0.7release notes

  • Nested min/max calls with keyword arguments in the inner call are no longer flagged, because flattening would drop the keyword and change the result.

    4.0.7release notes

  • Suggested splat-call rewrites no longer drop arguments positioned after the splatted call.

    4.0.7release notes

  • The check no longer crashes when an async context manager infers to a value without a name, such as a slice.

    4.0.7release notes

  • The check no longer crashes when a context manager infers to a value without a name, such as a slice.

    4.0.7release notes

  • PEP 695 type parameters are excluded from the local-variable count.

    4.0.7release notes

  • The check no longer reports a false positive when an override changes the default value of a positional-only parameter.

    4.0.7release notes

  • Preserves explicit zero values for `col_offset` and other line or end-position arguments instead of replacing them with AST node values.

    4.0.6release notes

  • No longer crashes on classes inheriting from a base class that Pylint cannot fully analyze.

    4.0.6release notes

  • Fixes a false positive for a user-defined `__suppress_context__` attribute on exception subclasses.

    4.0.6release notes

  • Checks the metaclass `__call__` signature when evaluating arguments of a class call.

    4.0.6release notes

  • No longer crashes when the `for` loop target is an attribute rather than a simple variable name.

    4.0.6release notes

  • Avoids crashing when enum member inference fails while checking enum subclasses.

    4.0.6release notes

  • Avoids a crash on `len()` calls without arguments.

    4.0.6release notes

  • No longer emitted for implicit concatenation of a raw string with a non-raw one, which cannot be merged into a single string.

    4.0.6release notes

  • The deprecated checker no longer crashes when `__import__` is called with a non-string constant argument.

    4.0.6release notes

  • The variable checker no longer crashes when a name resolves to a dataclass-synthesized `__init__` with no line number.

    4.0.6release notes

  • The variables checker no longer crashes when a class metaclass attribute-access chain does not bottom out at a name.

    4.0.6release notes

  • The typecheck checker no longer crashes when a class uses a non-class object as its `metaclass=` argument.

    4.0.6release notes

  • Fixes a false positive when `cached_property is imported directly from functools`.

    4.0.6release notes

  • Avoids a false positive when one of several inferred possible types defines a dynamic `__getattr__`.

    4.0.6release notes

  • The variables checker no longer crashes when `NotImplemented` is used as an if-statement test on Python 3.14.

    4.0.6release notes

  • Fixes a false positive in non-static methods and classmethods.

    4.0.6release notes

  • The name checker no longer crashes when a chained assignment of a `TypeAlias value has a non-name target such as a Subscript`.

    4.0.6release notes

  • The name checker no longer crashes when a non-constant value is passed as the `covariant or contravariant` argument.

    4.0.6release notes

  • Fixes a false positive when a name used as a nested class's `metaclass` argument is referenced again later in the module.

    4.0.6release notes

  • Prevents a crash when `infer_call_result() raises InferenceError` while inspecting decorator return signatures.

    4.0.6release notes

  • For a dict comprehension iterating a dict directly, suggests `dict(d.keys()) rather than the incorrect dict(d)`.

    4.0.6release notes

  • Global variables matching `dummy-variables-rgx are no longer falsely reported as unused when allow-global-unused-variables` is disabled.

    4.0.6release notes

  • Fixes a false positive for names bound by `from X import *` in every branch of an if/elif/else chain.

    4.0.6release notes

  • Fixes dynamic color mapping for fail-on messages when using multiple reporter or output formats.

    4.0.5release notes

  • Evaluates dataclass fields typed with Final against the class_attribute regex rather than the class_const regex.

    4.0.5release notes

  • Fixes the configuration option being ignored.

    4.0.5release notes

  • Avoids a false positive when logging functions are called without formatting arguments.

    4.0.5release notes

  • Fixes a false positive when using self.fail() in tests.

    4.0.5release notes

  • Fixed a false positive on an UPPER_CASED name inside an if branch that assigns an object.

    4.0.4release notes

  • Fixed a false positive where module-level constants were incorrectly classified as variables when a class-level attribute with the same name exists.

    4.0.4release notes

  • Prevents a crash when a variable annotation without assignment is used as the if test expression.

    4.0.3release notes

  • Avoids a false positive for template strings when using a format spec.

    4.0.3release notes

  • The ignore option works as expected again.

    4.0.3release notes

  • Avoids false positives for names annotated with typing.Annotated or Final, including UPPER_CASED class attributes typed with Final.

    4.0.3release notes

  • Prevents a crash when a slice object is called.

    4.0.3release notes

  • Avoids a false positive when a tuple is assigned to a function call whose return structure is ambiguous.

    4.0.3release notes

  • Fixes a false positive on partially uninferable module-level constants.

    4.0.2release notes

  • Fixes a false positive on exclusive module-level assignments composed of three or more branches.

    4.0.2release notes

  • Fixes a false positive for TypedDict instances.

    4.0.2release notes

  • Fixes a false positive when a case guard is used.

    4.0.1release notes

  • The check now excludes __all__ and __future__.annotations from unused-variable reports.

    4.0.1release notes

  • The inference engine better understands implicit booleanness and ternary expressions, avoiding some unsubscriptable-object reports.

    4.0.0release notes

  • The message uses Unicode from the AST instead of reformatting node values, avoiding formatting problems, and now uses double quotes.

    4.0.0release notes

  • Pylint handles deferred evaluation of annotations in Python 3.14.

    4.0.0release notes

  • The check now detects deprecated modules when __import__ is used.

    4.0.0release notes

  • Commented-out code blocks no longer emit fixme.

    4.0.0release notes

  • Fixes a crash caused by malformed format strings with keyword arguments.

    4.0.0release notes

  • Fixes false positives when quit() or exit() is used.

    4.0.0release notes

  • Fixes a crash when builtins.min or builtins.max is used instead of min or max directly.

    4.0.0release notes

  • Fixes false positives for members of concurrent.futures with Python 3.14.

    4.0.0release notes

  • Generated class diagrams now correctly display return types of annotated properties.

    4.0.0release notes

  • Aggregations are now detected for list, dict, set, and generator comprehensions.

    4.0.0release notes

  • Unicode containing surrogates is displayed with replacement question marks instead of crashing.

    4.0.0release notes

  • The check now examines both sides rather than only the left-hand side.

    4.0.0release notes

  • Fixes a crash when an enumerated list index is deleted inside a for loop.

    4.0.0release notes

  • Fixes a false positive when a variable defined under an if and via a named expression is later used under the same test.

    4.0.0release notes

  • Fixes a false negative when a TYPE_CHECKING import is used as a type annotation before erroneous usage.

    4.0.0release notes

  • Fixes a false negative when a function defined inside a TYPE_CHECKING guard is used later.

    4.0.0release notes

pylint 372 changes

Breaking changes 44

  • Now emitted for calls to builtin methods such as dict.update(); list.sort() now emits this message instead of assignment-from-none.

    3.0.0release notes

  • Removed; use utils.only_required_for_messages.

    3.0.0release notes

  • Use this to access global options instead of the removed get_global_option utility.

    3.0.0release notes

  • Now accepts only a MessageStyle object.

    3.0.0release notes

  • Now accepts only ColorMappingDict.

    3.0.0release notes

  • The message was renamed to use-implicit-booleaness-not-comparison-to-string and must now be enabled explicitly.

    3.0.0release notes

  • The check is now applied to dictionaries and lists as well.

    3.0.0release notes

  • Disables placed in a try block now also apply to its except block, without requiring an else clause.

    3.0.0release notes

  • Use this utility in place of get_python_path and provide source roots.

    3.0.0release notes

  • Enabling or disabling individual messages takes effect even when --enable=all or --disable=all follows in the same configuration file or command line.

    3.0.0release notes

  • epylint was removed from Pylint and now lives in a separate repository.

    3.0.0release notes

  • The modname and msg_store arguments are now required.

    3.0.0release notes

  • The modname and msg_store arguments are now required.

    3.0.0release notes

  • Use discover_package_path and pass source roots instead of the removed get_python_path utility.

    3.0.0release notes

  • Removed; use checker.linter.config to access global options.

    3.0.0release notes

  • Removed from the base checker API; access message definitions through MessageStore.

    3.0.0release notes

  • Removed; use discover_package_path and pass source roots.

    3.0.0release notes

  • Support for the __implements__ construct, including Pyreverse diagram handling, was removed.

    3.0.0release notes

  • Interface classes in pylint.interfaces were removed; Checker should inherit BaseChecker or another checker type, and Reporter should inherit BaseReporter.

    3.0.0release notes

  • Removed; use utils.get_node_first_ancestor_of_type(x, nodes.Lambda).

    3.0.0release notes

  • Removed; implement get_map_data and reduce_map_data to reduce checker map data.

    3.0.0release notes

  • The location argument must now be a MessageLocationTuple.

    3.0.0release notes

  • Suggested alternative to MessageDefinition.may_be_emitted when adapting to its newly required py_version argument.

    3.0.0release notes

  • The py_version argument is now required; the notes suggest using linter.config.py_version or MessageDefinition.is_message_enabled instead.

    3.0.0release notes

  • Use MessageStore to access message definitions instead of the removed get_message_definition base checker API.

    3.0.0release notes

  • Now requires the correct number of arguments at all times.

    3.0.0release notes

  • The option now recognizes only fully qualified names, such as builtins.Exception, so existing overrides may need updating.

    3.0.0release notes

  • Use this generator in place of the removed pylint.config.PYLINTRC.

    3.0.0release notes

  • This configuration API was removed; use pylint.config.find_default_config_files instead.

    3.0.0release notes

  • The extension was removed; remove it from load-plugins. Its checks are now part of the implicit booleaness checker.

    3.0.0release notes

  • Use pylint.main instead of MASTER or master as the configuration section in setup.cfg or tox.ini.

    3.0.0release notes

  • Now accepts sequences of strings, not strings.

    3.0.0release notes

  • Replaced by Pylinter.check_single_file_item.

    3.0.0release notes

  • Use this function in place of Pylinter.check_single_file.

    3.0.0release notes

  • Pyreverse no longer supports the .vcg output format.

    3.0.0release notes

  • Pylint can no longer be launched with Python 3.7, though it can still lint code targeting that version with --py-version=3.7.

    3.0.0release notes

  • Assign the output stream to reporter.out instead of calling the removed Reporter.set_output method.

    3.0.0release notes

  • Removed in favor of assigning the output stream to reporter.out.

    3.0.0release notes

  • The do_exit argument was removed.

    3.0.0release notes

  • Union is no longer considered a type annotation as a type alias, and unassigned Union-typed variables are no longer treated as TypeAlias.

    3.0.0release notes

  • The error formerly named unneeded-not was renamed to unnecessary_negation.

    3.0.0release notes

  • Renamed from compare-to-empty-string and must be enabled explicitly.

    3.0.0release notes

  • Now detects calls to module-level functions made before their definition and fixes false positives in guarded assignments and TYPE_CHECKING import cases.

    3.0.0release notes

  • Pyreverse adds a verbose flag to restore the original output with parsed modules; package statistics are now printed by default.

    3.0.0release notes

New APIs and options 9

  • A new checker message detects invalid dataclasses.field() usage.

    3.0.0release notes

  • A new reporter provides enriched, parseable JSON with messages, messageId, module scores, and statistics; the json reporter will no longer be maintained.

    3.0.0release notes

  • A new message warns when a keyword argument shares a name with a positional-only parameter and is captured by a keyword variadic parameter dictionary.

    3.0.0release notes

  • Alias for Pyreverse's --show-stdlib option.

    3.0.0release notes

  • Pyreverse can exclude standalone nodes from diagrams.

    3.0.0release notes

  • The CodeStyleChecker can suggest replacing collections.namedtuple calls with classes inheriting from typing.NamedTuple on Python 3.6 and later.

    3.0.0release notes

  • Load this extension to enable the prefer-typing-namedtuple message.

    3.0.0release notes

  • A new message reports return statements found in a finally clause.

    3.0.0release notes

  • Pyreverse can include standard library modules, which are not included by default.

    3.0.0release notes

Behavior and default changes 9

  • Added to the default defining-attr-methods list to silence attribute-defined-outside-init for unittest.IsolatedAsyncioTestCase.

    3.0.0release notes

  • When enabled, the checker now allows parenthesized implicitly concatenated strings.

    3.0.0release notes

  • Now also clears LRU caches for Pylint utilities that hold references to AST nodes.

    3.0.0release notes

  • The message no longer checks for a minimum name length of three characters by default; configure regex options if length checking is desired.

    3.0.0release notes

  • The parallel jobs option can now be used with --load-plugins, duplicate-code, and cyclic-import.

    3.0.0release notes

  • No longer emitted for explicitly concatenated string arguments.

    3.0.0release notes

  • Pylint searches for pyproject.toml recursively in parent directories up to a project or filesystem root.

    3.0.0release notes

  • Pyreverse uses a new default color palette designed to be more colorblind friendly; custom colors can be specified with --color-palette.

    3.0.0release notes

  • Package statistics are now printed when running Pyreverse.

    3.0.0release notes

Tooling 3

  • Package dependency diagrams show when a module imports another only for type-checking.

    3.0.0release notes

  • Pylint officially supports Python 3.12.

    3.0.0release notes

  • Pylint now exposes its type annotations.

    3.0.0release notes

Fixes and other changes 7

  • The message now works when linting in parallel with --jobs.

    3.0.0release notes

  • The message now works when linting in parallel with --jobs.

    3.0.0release notes

  • The option is now correctly taken into account for no-name-in-module.

    3.0.0release notes

  • Matching now requires a full match instead of accepting a partial match.

    3.0.0release notes

  • Pylint always considers sys.argv impossible to infer instead of using the values passed to Pylint.

    3.0.0release notes

  • Now considers positional-only and keyword-only parameters.

    3.0.0release notes

  • Statement counting under try blocks was corrected, fixing false positives and false negatives.

    3.0.0release notes