2018-08-09 08:39:05 +00:00
|
|
|
**************************
|
|
|
|
What's New in Pylint 2.2
|
|
|
|
**************************
|
|
|
|
|
|
|
|
:Release: 2.2
|
2018-11-25 17:28:22 +00:00
|
|
|
:Date: 2018-11-25
|
2018-08-09 08:39:05 +00:00
|
|
|
|
|
|
|
Summary -- Release highlights
|
|
|
|
=============================
|
|
|
|
|
|
|
|
|
|
|
|
New checkers
|
|
|
|
============
|
|
|
|
|
2018-09-01 18:58:11 +00:00
|
|
|
* String checker now reports format string type mismatches.
|
2018-08-09 08:39:05 +00:00
|
|
|
|
2018-09-05 08:16:37 +00:00
|
|
|
* ``duplicate-string-formatting-argument`` was added for detecting duplicate string
|
|
|
|
formatting arguments that should be passed instead as named arguments.
|
|
|
|
|
2018-10-04 07:28:36 +00:00
|
|
|
* ``logging-format-style`` is a new option for the logging checker for usage of
|
|
|
|
str.format() style format strings in calls to loggers.
|
|
|
|
|
2018-11-28 08:13:17 +00:00
|
|
|
It accepts two options: ``--logging-format-style=old`` for using `%` style formatting,
|
|
|
|
which is the assumed default, and ``--logging-format-style=new`` for using `{}` style formatting.
|
|
|
|
|
2018-10-10 17:56:25 +00:00
|
|
|
* ``implicit-str-concat-in-sequence`` detects string concatenation inside lists, sets & tuples.
|
|
|
|
|
|
|
|
Example of code that would generate such warning:
|
|
|
|
|
|
|
|
.. code-block:: python
|
|
|
|
|
|
|
|
woops = ('a', 'b' 'c')
|
|
|
|
|
|
|
|
|
2018-08-09 08:39:05 +00:00
|
|
|
Other Changes
|
|
|
|
=============
|
|
|
|
|
2018-09-28 12:06:20 +00:00
|
|
|
* `try-except-raise` checker now handles multilevel inheritance hirerachy for exceptions correctly.
|
|
|
|
|
|
|
|
Close #2484
|
|
|
|
|
2018-08-12 09:26:12 +00:00
|
|
|
* Ignore import x.y.z as z cases for checker `useless-import-alias`.
|
|
|
|
|
2018-11-25 17:28:22 +00:00
|
|
|
* `unnecessary-pass` is now also emitted when a function or class contains only docstring and pass statement,
|
2018-08-09 08:39:05 +00:00
|
|
|
in which case, docstring is enough for empty definition.
|
|
|
|
|
2018-08-10 14:39:14 +00:00
|
|
|
* Fix false positive ``undefined-variable`` and ``used-before-assignment`` with nonlocal keyword usage.
|
|
|
|
|
2018-08-22 06:57:16 +00:00
|
|
|
* Fix exceptions being raised when one of the params is not a ClassDef for :func:`checkers.utils.is_subclass_of`.
|
2018-08-22 07:33:44 +00:00
|
|
|
|
|
|
|
* ``pylint`` now picks the latest value from the inferred values of the exception that gets
|
|
|
|
raised, when looking for ``raising-non-exception``. This helps when reusing a variable name
|
|
|
|
for multiple types, since ``pylint`` was picking just the first inferred value, leading
|
|
|
|
to spurious false positives.
|
|
|
|
|
2018-08-24 08:26:06 +00:00
|
|
|
Close #2431
|
|
|
|
|
|
|
|
* ``pylint`` used to emit a ``not-an-iterable`` error when looking at coroutines built
|
|
|
|
with ``asyncio.coroutine``. This is no longer the case as we handle coroutines explicitly.
|
|
|
|
|
|
|
|
Close #996
|
2018-08-31 08:10:08 +00:00
|
|
|
|
|
|
|
* ``pylint`` used to emit a ``unused-variable`` error if unused import was found in the function. Now instead of
|
|
|
|
``unused-variable``, ``unused-import`` is emitted.
|
|
|
|
|
|
|
|
Close #2421
|