What's New in Pylint 2.3.0?#
Release date: 2019-02-27
NonDeducibleTypeHierarchywhen calling semi-private
NonDeducibleTypeHierarchywhen it cannot infer the base classes of the given types, but that makes sense in its context given that the method is mostly used to inform the inference process about the hierarchy of classes. Doesn't make that much sense for
pylintitself, which is why we're handling the exception here, rather than in
Added a new command line option
list-groupsfor listing all the check groups
broad-except, just like
Fixed a crash that occurred for
*-not-iteratingchecks for builtins consumed by
Fix a crash caused by iterating over
Uninferablein a string formatting check.
Fixed false positives for
__class_getitem__(new in Python 3.7)
Ellipsisas a synonym for
fixmegets triggered only on comments.
Fixed a false positive for
load_configuration()hook for plugins
New optional hook for plugins is added:
load_configuration(). This hook is executed after configuration is loaded to prevent overwriting plugin specific configuration via user-based configuration.
Fix missing-raises-doc false positive (W9006)
Exempt starred unpacking from
*-not-iteratingPython 3 checks
compare-to-zeroless zealous by checking against equality and identity
*-not-iteratingPython 3 checks.
Fix incorrect generation of
Fixed issue where
ifstatements with nested
ifstatements were incorrectly being flagged as
no-else-returnin some cases and not being flagged as
no-else-returnin other cases. Added tests for verification and updated pylint source files to eliminate newly exposed warnings.
Fix false positive with
not-async-context-managercaused by not understanding
bad-reversed-sequenceto account for more objects that can define
One such object would be an enum class, for which
__reversed__yields each individual enum. As such, the check for
bad-reversed-sequenceneeds to not differentiate between classes and instances when it comes for checking of
Used when an operation is done against an exception, but the operation is not valid for the exception in question. Usually emitted when having binary operations between exceptions in except handlers.
no-memberis emitted for enums when they lack a member
Previously we weren't doing this because we detected a
__getattr__implementation on the
Enumclass (and this check is skipped for classes with
__getattr__), but that is fine for Enums, given that they are inferred in a customised way in astroid.
Previous version incorrectly detects a < b < c and b < d and fails to detect a < b < c and c < d.
Avoid popping __main__ when using multiple jobs
Add a new option 'check-str-concat-over-line-jumps' to check 'implicit-str-concat-in-sequence'
Fixes for the new style logging format linter.
The number of arguments was not handled properly, leading to an always successful check.
Fix false positive
not-callablefor uninferable properties.
Fix false positive
useless-else-on-loopif the break is deep in the else of an inner loop.
Minor improvements to the help text for a few options.