What's New in Pylint 4.2

:Release:4.2 :Date: TBA

Summary -- Release highlights

What's new in Pylint 4.2.0?

Release date: TBA

New Features

  • Add visual indicator to score output when score is below the --fail-under threshold.

    Closes #8503 (#8503)

  • Message documentation can now be opened using a message ID or symbol shortcut.

    Closes #9320 (#9320)

False Positives Fixed

  • Fix unused-import false positives for names used only in the metaclass= argument of a class defined inside another class or inside a block such as an if, or within a more complex expression like a conditional expression, a call argument, a lambda or a comprehension. A name already used before such a class is also no longer reported as undefined-variable when the metaclass cannot be inferred. The names of a class body are no longer resolved from the metaclass of a class defined in one of its methods, where they are not visible: undefined-variable is now reported for them, as for the bases.

    Closes #1630 (#1630)

  • Fixed a false positive for arguments-differ when an overriding method declares a parameter as positional-only (/) that is a regular parameter in the overridden method. Positional-only parameters are now counted as positional parameters in the comparison.

    Closes #11567 (#11567)

False Negatives Fixed

  • Report used-before-assignment when a bare type annotation masks assignments that may not execute in try, except, or finally control flow.

    Closes #10847 (#10847)

Other Bug Fixes

  • The MermaidJS output of pyreverse now honours --module-names=y: each class is labelled with its module-qualified name, as the dot and PlantUML outputs already were.

    Closes #10164 (#10164)

Other Changes

  • Document TOML escaping and the reserved backslashes in the ignore-paths option.

    Closes #6963 (#6963)

  • Fix the programmatic run_pylint example to pass command-line arguments as a sequence.

    Closes #8766 (#8766)

  • Clarify the distinction between the built-in design checker and the optional McCabe extension, including how to disable their messages individually.

    Fixes part of #9174 (#9174)

  • Document the no-header output format and the use of a custom reporter class with --output-format.

    Closes #11595 (#11595)

  • Remove support for launching pylint with Python 3.10. Code that supports Python 3.10 can still be linted with the --py-version=3.10 setting.

    Refs #11643 (#11643)