What's New in Pylint 2.2.2?#
Release date: 2018-11-28
logging-format-styleto use name identifier instead of their corresponding Python identifiers
This is to prevent users having to think about escaping the default value for
logging-format-stylein the generated config file. Also our config parsing utilities don't quite support escaped values when it comes to
choicesdetection, so this would have needed various hacks around that.
What's New in Pylint 2.2.1?#
Release date: 2018-11-27
Fix a crash caused by
implicit-str-concat-in-sequenceand multi-bytes characters.
What's New in Pylint 2.2?#
Release date: 2018-11-25
undefined-loop-variableleaking from iteration.
deprecated-methodcan use the attribute name for identifying a deprecated method
Previously we were using the fully qualified name, which we still do, but the fully qualified name for some
unittestdeprecated aliases leads to a generic deprecation function. Instead on relying on that, we now also rely on the attribute name, which should solve some false positives.
Closes #1653 Closes #1946
Fix compatibility with changes to stdlib tokenizer.
pylintis less eager to consume the whole line for pragmas
Obtain the correct number of CPUs for virtualized or containerized environments.
unbalanced-tuple-unpackingback to a warning.
It used to be a warning until a couple of years ago, after it was promoted to an error. But the check might be suggesting the wrong thing in some cases, for instance when checking against
sys.argvwhich cannot be known at static analysis time. Given it might rely on potential unknown data, it's best to have it as a warning.
enumerateusage suggestion when defining
too-many-starred-assignmentonly when the number of Starred nodes is per assignment elements
try-except-raisechecker now handles multilevel inheritance hirerachy for exceptions correctly.
Add a new check,
simplifiable-if-expressionfor expressions like
True if cond else False.
too-few-public-methodsis not reported for
`too-few-public-methodsis not reported for dataclasses created with options.
Remove wrong modules from 'bad-python3-import'.
jsonreporter prints an empty list when no messages are emitted
Add a new check,
This new check is emitted whenever a duplicate string formatting argument is found.
assignment-from-no-returnis not emitted for coroutines.
Report format string type mismatches.
simplified-boolean-expressionno longer emit for sequence based checks
AstroidSyntaxErrorwhen trying to import a module.
__module__to be redefined at a class level.
pylintused to emit an
unused-variableerror if unused import was found in the function. Now instead of
Handle asyncio.coroutine when looking for
locally-enabledcheck is gone.
Infer decorated methods when looking for method-hidden
Pick the latest value from the inferred values when looking for
Extend the TYPE_CHECKING guard to TYPE_CHECKING name as well, not just the attribute
Ignore import x.y.z as z cases for checker
Fix false positive
used-before-assignmentwith nonlocal keyword usage.
protected-accessexception for missing class attributes
assignment-from-no-returnfor decorated function nodes
unnecessary-passis now also emitted when a function or class contains only docstring and pass statement.
In Python, stubbed functions often have a body that contains just a single
passstatement, indicating that the function doesn't do anything. However, a stubbed function can also have just a docstring, and function with a docstring and no body also does nothing.
duplicate-argument-nameis emitted for more than one duplicate argument per function
Allow double indentation levels for more distinguishable indentations
Consider tuples in exception handler for
Fix astroid.ClassDef check in checkers.utils.is_subclass_of
Fix wildcard imports being ignored by the import checker
Fix external/internal distinction being broken in the import graph
Fix wildcard import check not skipping
Add new option to logging checker,
Fix --ignore-imports to understand multi-line imports
Closes #1422 Closes #2019
Add a new check 'implicit-str-concat-in-sequence' to spot string concatenation inside lists, sets & tuples.
literal-comparisonis now emitted for 0 and 1 literals.