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