Changelog History
Page 1
-
v4.0.5 Changes
February 20, 2026๐ 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.
๐ Fixed false positive for
logging-unsupported-formatwhen no arguments are provided to logging functions.๐ Fix a false positive for
invalid-namewhere a dataclass field typed withFinal
was evaluated against theclass_constregex instead of theclass_attributeregex.Avoid emitting
unspecified-encoding(W1514) whenpy-versionis 3.15+.
๐ Other Bug Fixes
Fix
--known_third_partyconfig being ignored.๐ Fixed dynamic color mapping for "fail-on" messages when using multiple reporter/output formats.
dependency on isort is now set to <9, permitting to use isort 8.
-
v4.0.4 Changes
November 30, 2025๐ What's new in Pylint 4.0.4?
๐ Release date: 2025-11-30
๐ False Positives Fixed
๐ Fixed false positive for
invalid-namewhere module-level constants were incorrectly classified as variables when a class-level attribute with the same name exists.๐ Fix a false positive for
invalid-nameon an UPPER_CASED name inside anifbranch that assigns an object.
-
v4.0.3 Changes
November 13, 2025๐ What's new in Pylint 4.0.3?
๐ Release date: 2025-11-13
๐ False Positives Fixed
Add Enum dunder methods
_generate_next_value_,_missing_,_numeric_repr_,_add_alias_, and_add_value_alias_to the list passed to--good-dunder-names.๐ Fixed false positive for
invalid-namewithtyping.Annotated.๐ Fix false positive for
f-string-without-interpolationwith template strings
when using format spec.๐ Fix a false positive when an UPPER_CASED class attribute was raising an
invalid-namewhen typed withFinal.๐ Fix a false positive for
unbalanced-tuple-unpackingwhen a tuple is assigned to a function call and the structure of the function's return value is ambiguous.
๐ Other Bug Fixes
๐ Make 'ignore' option work as expected again.
๐ Fix crash for
consider-using-assignment-exprwhen a variable annotation without assignment
โ is used as theiftest expression.๐ Fix crash for
prefer-typing-namedtupleandconsider-math-not-floatwhen
asliceobject is called.
-
v4.0.2 Changes
October 20, 2025๐ False Positives Fixed
๐ Fix false positive for
invalid-nameon a partially uninferable module-level constant.๐ Fix a false positive for
invalid-nameon exclusive module-level assignments
composed of three or more branches. We won't raisedisallowed-nameon module-level names that can't be inferred
๐จ until a further refactor to remove this false negative is done.๐ Fix false positive for
invalid-nameforTypedDictinstances.
-
v4.0.1 Changes
October 15, 2025๐ What's new in Pylint 4.0.1?
๐ Release date: 2025-10-14
๐ False Positives Fixed
Exclude
__all__and__future__.annotationsfromunused-variable.๐ Fix false-positive for
bare-name-capture-patternif a case guard is used.Check enums created with the
Enum()functional syntax to pass against the
--class-rgxfor theinvalid-namecheck, like other enums.
-
v4.0.0 Changes
October 12, 2025๐ Pylint now supports Python 3.14.
๐ Pylint's inference engine (
astroid) is now much more precise,
understanding implicit booleanness and ternary expressions. (Thanks @zenlyj!)
Consider this example:
classResult:errors:dict|None=Noneresult=Result()ifresult.errors:result.errors[field\_key]# inference engine understands result.errors cannot be None# pylint no longer raises unsubscriptable-object๐ The required
astroidversion is now 4.0.0. See the astroid changelog for additional fixes, features, and performance improvements applicable to pylint.- Handling of
invalid-nameat the module level was patchy. Now,
module-level constants that are reassigned are treated as variables and checked
against--variable-rgxrather than--const-rgx. Module-level lists,
sets, and objects can pass against either regex.
๐ Here,
LIMITis reassigned, so pylint only uses--variable-rgx:LIMIT=500# [invalid-name]ifsometimes:LIMIT=1# [invalid-name]If this is undesired, refactor using exclusive assignment so that it is
evident that this assignment happens only once:ifsometimes:LIMIT=1else:LIMIT=500# exclusive assignment: uses const regex, no warningLists, sets, and objects still pass against either
const-rgxorvariable-rgx
even if reassigned, but are no longer completely skipped:MY\_LIST=[]my\_list=[]My\_List=[]# [invalid-name]๐ Remember to adjust the regexes and allow lists to your liking.
๐ฅ Breaking Changes
invalid-namenow distinguishes module-level constants that are assigned only once
from those that are reassigned and now applies--variable-rgxto the latter. Values
other than literals (lists, sets, objects) can pass against either the constant or
variable regexes (e.g. "LOGGER" or "logger" but not "LoGgEr").The unused
pylintrcargument toPyLinter. __init__ ()is deprecated
๐ and will be removed.๐ Commented out code blocks such as
# bar() # TODO: remove dead codewill no longer emitfixme.pyreverseRunwas changed to no longer callsys.exit()in its__init__.
You should now callRun(args).run()which will return the exit code instead.
๐ป Having a class that always raised aSystemExitexception was considered a bug.๐ The
suggestion-modeoption was removed, as pylint now always emits user-friendly hints instead
๐ of false-positive error messages. You should remove it from your conf if it's defined.The
async.pychecker module has been renamed toasync_checker.pysinceasyncis a Python keyword
โ and cannot be imported directly. This allows for better testing and extensibility of the async checker functionality.โ The message-id of
continue-in-finallywas changed fromE0116toW0136. The warning is
โ now emitted for every Python version since it will raise a syntax warning in Python 3.14.
๐ See PEP 765 - Disallow return/break/continue that exit a finally block.โ Removed support for
nmp.NaNalias fornumpy.NaNbeing recognized in ':ref:nan-comparison'. Usenpornumpyinstead.๐ Version requirement for
isorthas been bumped to >=5.0.0.
๐ The internal compatibility for olderisortversions exposed viapylint.utils.IsortDriverhas
๐ been removed.
๐ New Features
comparison-of-constantsnow uses the unicode from the ast instead of reformatting from
the node's values preventing some bad formatting due toutf-8limitation. The message now uses
๐"instead of'to better work with what the python ast returns.โจ Enhanced pyreverse to properly distinguish between UML relationship types (association, aggregation, composition) based on object ownership semantics. Type annotations without assignment are now treated as associations, parameter assignments as aggregations, and object instantiation as compositions.
๐ The
fixmecheck can now search through docstrings as well as comments, by using
๐check-fixme-in-docstring = truein the[tool.pylint.miscellaneous]section.The
use-implicit-booleaness-not-xchecks now distinguish between comparisons
๐จ used in boolean contexts and those that are not, enabling them to provide more accurate refactoring suggestions.The verbose option now outputs the filenames of the files that have been checked.
Previously, it only included the number of checked and skipped files.๐ง colorized reporter now colorizes messages/categories that have been configured as
fail-onin red inverse.
๐ This makes it easier to quickly find the errors that are causing pylint CI job failures.โจ Enhanced support for @Property decorator in pyreverse to correctly display return types of annotated properties when generating class diagrams.
โ Add --max-depth option to pyreverse to control diagram complexity. A depth of 0 shows only top-level packages, 1 shows one level of subpackages, etc.
๐ฆ This helps manage visualization of large codebases by limiting the depth of displayed packages and classes.๐ Handle deferred evaluation of annotations in Python 3.14.
โจ Enhanced pyreverse to properly detect aggregations for comprehensions (list, dict, set, generator).
๐
pyreverse: add support for colorized output when using output formatmmd(MermaidJS) andhtml.๐ pypy 3.11 is now officially supported.
โ Add support for Python 3.14.
โ Add naming styles for
ParamSpecandTypeVarTuplethat align with theTypeVarstyle.
๐ New Checks
โ Add
match-statementschecker and the following message:
bare-name-capture-pattern.
This will emit an error message when a name capture pattern is used in a match statement which would make the remaining patterns unreachable.
This code is a SyntaxError at runtime.โ Add new check
async-context-manager-with-regular-withto detect async context managers used with regularwithstatements instead ofasync with.โ Add
break-in-finallywarning. Usingbreakinside thefinallyclause
โ will raise a syntax warning in Python 3.14.
๐ SeePEP 765 - Disallow return/break/continue that exit a finally block <https://peps.python.org/pep-0765/>_.โ Add new checks for invalid uses of class patterns in :keyword:
match.โ Add additional checks for suboptimal uses of class patterns in :keyword:
match.โ Add a
consider-math-not-floatmessage.float("nan")andfloat("inf")are slower
than their counterpartmath.infandmath.nanby a factor of 4 (notwithstanding
the initial import of math) and they are also not well typed when using mypy.
โ๏ธ This check also catches typos in float calls as a side effect.
๐ False Positives Fixed
๐ Fix a false positive for
used-before-assignmentwhen a variable defined under
anifand via a named expression (walrus operator) is used later when guarded
โ under the sameiftest.๐ Fix :ref:
no-name-in-modulefor members ofconcurrent.futureswith Python 3.14.
๐ False Negatives Fixed
๐ Fix false negative for
used-before-assignmentwhen aTYPE_CHECKINGimport is used as a type annotation prior to erroneous usage.Match cases are now counted as edges in the McCabe graph and will increase the complexity accordingly.
Check module-level constants with type annotations for
invalid-name.
๐ Remember to adjustconst-naming-styleorconst-rgxto your liking.๐ Fix false negative where function-redefined (E0102) was not reported for functions with a leading underscore.
๐ฒ We now raise a
logging-too-few-argsfor format string with no
๐ฒ interpolation arguments at all (i.e. for something likelogging.debug("Awaiting process %s")
๐ฒ orlogging.debug("Awaiting process {pid}")). Previously we did not rais...
-
v3.3.9 Changes
October 05, 2025๐ What's new in Pylint 3.3.9?
๐ Release date: 2025-10-05
๐ False Positives Fixed
๐ Fix used-before-assignment for PEP 695 type aliases and parameters.
๐ No longer flag undeprecated functions in
importlib.resourcesas deprecated.๐ Fix false positive
inconsistent-return-statementswhen usingquit()orexit()functions.๐ Fix false positive
undefined-variable(E0602) for for-loop variable shadowing patterns likefor item in item:when the variable was previously defined.
๐ Other Bug Fixes
- ๐ Fixed crash in 'unnecessary-list-index-lookup' when starting an enumeration using
minus the length of an iterable inside a dict comprehension when the len call was only
made in this dict comprehension, and not elsewhere. Also changed the approach,
to use inference in all cases but the simple ones, so we don't have to fix crashes
one by one for arbitrarily complex expressions in enumerate.
-
v3.3.8 Changes
August 09, 2025๐ What's new in Pylint 3.3.8?
๐ Release date: 2025-08-09
๐ This patch release includes an exceptional fix for a false negative issue. For details, see: #10482 (comment)
๐ False Positives Fixed
๐ Fix false positives for
possibly-used-before-assignmentwhen variables are exhaustively
assigned within amatchblock.๐ Fix false positive for
missing-raises-docandmissing-yield-docwhen the method length is less than docstring-min-length.๐ Fix a false positive for
unused-variablewhen multiple except handlers bind the same name under a try block.
๐ False Negatives Fixed
- Fix false-negative for
used-before-assignmentwithfrom __future__ import annotationsin function definitions.
๐ Other Bug Fixes
๐ Fix a bug in Pyreverse where aggregations and associations were included in diagrams regardless of the selected --filter-mode (such as PUB_ONLY, ALL, etc.).
๐ Fix double underscores erroneously rendering as bold in pyreverse's Mermaid output.
-
v3.3.7 Changes
May 04, 2025๐ What's new in Pylint 3.3.7?
๐ Release date: 2025-05-04
๐ False Positives Fixed
- โ Comparisons between two calls to
type()won't raise anunidiomatic-typecheckwarning anymore, consistent with the behavior applied only for==previously.
๐ Other Bug Fixes
๐ Fixed a crash when importing a class decorator that did not exist with the same name as a class attribute after the class definition.
๐ Fix a crash caused by malformed format strings when using
.formatwith keyword arguments.Using a slice as a class decorator now raises a
not-callablemessage instead of crashing. A lot of checks that dealt with decorators (too many to list) are now shortcut if the decorator can't immediately be inferred to a function or class definition.
Other Changes
- The algorithm used for
no-membersuggestions is now more efficient and cuts the
calculation when the distance score is already above the threshold.
- โ Comparisons between two calls to
-
v3.3.6 Changes
March 20, 2025๐ What's new in Pylint 3.3.6?
๐ Release date: 2025-03-20
๐ False Positives Fixed
- ๐ Fix a false positive for
used-before-assignmentwhen an inner function's return type
annotation is a class defined at module scope.
- ๐ Fix a false positive for