What's New in Pylint 2.5.3?#
Release date: 2020-06-8
Fix a regression where disable comments that have checker names with numbers in them are not parsed correctly
property-with-parametersproperly handles abstract properties
continue-in-finallyno longer emitted on Python 3.8 where it's now valid
Fix a regression where messages with dash are not fully parsed
In a TOML configuration file, it's now possible to use rich (non-string) types, such as list, integer or boolean instead of strings. For example, one can now define a list of message identifiers to enable like this:
enable = [ "use-symbolic-message-instead", "useless-suppression", ]
Fix a regression where the score was not reported with multiple jobs
What's New in Pylint 2.5.2?#
Release date: 2020-05-05
do_exitas a deprecated parameter
What's New in Pylint 2.5.1?#
Release date: 2020-05-05
Fix a crash in
method-hiddenlookup for unknown base classes
This has been inadvertently changed several releases ago to
no-value-for-parametervariadic detection has improved for assign statements
Allow package files to be properly discovered with multiple jobs
Allow linting directories without
__init__.pywhich was a regression in 2.5.
What's New in Pylint 2.5.0?#
Release date: 2020-04-27
Fix a false negative for
undefined-variablewhen using class attribute in comprehension.
Fix a false positive for
undefined-variablewhen using class attribute in decorator or as type hint.
Closes #511 Closes #1976
Remove HTML quoting of messages in JSON output.
invalid-namerule to work with non-ASCII identifiers and add the
Positional-only arguments are taken in account for
unidiomatic-typecheckis no longer emitted for
Positional-only argument annotations are taken in account for
Add a command to list available extensions.
Allow used variables to be properly consumed when different checks are enabled / disabled
Fix dangerous-default-value rule to account for keyword argument defaults
Fix a false positive of
self-assigning-variableon tuple unpacking.
no-self-useis no longer emitted for typing stubs.
Fix a false positive for
invalid-namefor variables defined in loops at module level.
Add a check for cases where the second argument to
isinstanceis not a type.
Add 'notes-rgx' option, to be used for fixme check.
function-redefinedexempts function redefined on a condition.
typing.overloadfunctions are exempted from docstring checks
invalid-overridden-methodfor improper async def overrides.
Do not allow
python -m pylint ...to import user code
python -m pylint ...adds the current working directory as the first element of
sys.path. This opens up a potential security hole where
pylintwill import user level code as long as that code resides in modules having the same name as stdlib or pylint's own modules.
Fixed graph creation for relative paths
Add a check for asserts on string literals.
not inis considered iterating context for some of the Python 3 porting checkers.
A new check
Add a check for non string assignment to __name__ attribute.
__ceil__are recognized as special method names.
Added errors for protocol functions when invalid return types are detected. E0304 (invalid-bool-returned): __bool__ did not return a bool E0305 (invalid-index-returned): __index__ did not return an integer E0306 (invalid-repr-returned): __repr__ did not return a string E0307 (invalid-str-returned): __str__ did not return a string E0308 (invalid-bytes-returned): __bytes__ did not return a string E0309 (invalid-hash-returned): __hash__ did not return an integer E0310 (invalid-length-hint-returned): __length_hint__ did not return a non-negative integer E0311 (invalid-format-returned): __format__ did not return a string E0312 (invalid-getnewargs-returned): __getnewargs__ did not return a tuple E0313 (invalid-getnewargs-ex-returned): __getnewargs_ex__ did not return a tuple of the form (tuple, dict)
missing-*-docstringcan look for
undefined-variablecan now find undefined loop iterables
safe_infercan infer a value as long as all the paths share the same type.
Add a --fail-under <score> flag, also configurable in a .pylintrc file. If the final score is more than the specified score, it's considered a success and pylint exits with exitcode 0. Otherwise, it's considered a failure and pylint exits with its current exitcode based on the messages issued.
line-too-longfor multilines when
disable=line-too-longcomment stands at their end
AttributeErrorcaused by improper handling of
Do not exempt bare except from
undefined-variableand similar checks
If a node was wrapped in a
pylintwas taking a hint from the except handler when deciding to emit or not a message. We were treating bare except as a fully fledged ignore but only the corresponding exceptions should be handled that way (e.g.
No longer emit
assignment-from-no-returnwhen a function only raises an exception
Allow import aliases to exempt
import-errorwhen used in type annotations.
Ellipsis` is exempted from ``multiple-statementsfor function overloads.
No longer emit
invalid-namefor non-constants found at module level.
Pylint was taking the following statement from PEP-8 too far, considering all module level variables as constants, which is not what the statement is saying:
Constants are usually defined on a module level and written in all capital letters with underscores separating words.
Closes #3111 Closes #3132
implicit-str-concat-in-sequenceto be emitted for string juxtaposition
jsonreporter no longer bypasses
LintModuleTestand related methods from
pylint.testutilsto help testing for 3rd party pylint plugins.
Can read config from a setup.cfg or pyproject.toml file.
Fix exception-escape false positive with generators
inspect.getargvaluesis no longer marked as deprecated.
A new check
collections.*utilities as dangerous defaults
docparamsextension supports multiple types in raises sections.
Multiple types can also be separated by commas in all valid sections.
Allow parallel linting when run under Prospector
Fixed false positives of
method-hiddenwhen a subclass defines the method that is being hidden.
Python 3 porting mode is 30-50% faster on most codebases
Python 3 porting mode no longer swallows syntax errors
Pass the actual PyLinter object to sub processes to allow using custom PyLinter classes.
PyLinter object (and all its members except reporter) needs to support pickling so the PyLinter object can be passed to worker processes.
Clean up setup.py
Make pytest-runner a requirement only if running tests, similar to McCabe.
Clean up the setup.py file, resolving a number of warnings around it.
Handle SyntaxError in files passed via
Pylint no longer outputs a traceback, if a file, read from stdin, contains a syntaxerror.
Fix uppercase style to disallow 3+ uppercase followed by lowercase.
unused-importfalse positives when using a metaclass via an attribute.
unused-argumentfor functions that partially uses their argument list before raising an exception.
broad_try_clauseextension to check try/finally statements and to check for nested statements (e.g., inside of an
Recognize classes explicitly inheriting from
abc.ABCor having an
abc.ABCMetametaclass as abstract. This makes them not trigger W0223.
arguments-differwhen overridden function uses variadics
No message is emitted if the overriding function provides positional or keyword variadics in its signature that can feasibly accept and pass on all parameters given by the overridden function.
Closes #1482 Closes #1553
Multiple types of string formatting are allowed in logging functions.
logging-fstring-interpolationmessage has been brought back to allow multiple types of string formatting to be used.