| 1 |
Full changelog |
| 2 |
============== |
| 3 |
|
| 4 |
What's New in Pylint 2.3.0? |
| 5 |
--------------------------- |
| 6 |
Release date: 2019-02-27 |
| 7 |
|
| 8 |
* Protect against ``NonDeducibleTypeHierarchy`` when calling semi-private ``is_subtype`` |
| 9 |
|
| 10 |
``astroid.helpers.is_subtype`` raises ``NonDeducibleTypeHierarchy`` when it cannot infer |
| 11 |
the base classes of the given types, but that makes sense in its context given that |
| 12 |
the method is mostly used to inform the inference process about the hierarchy of classes. |
| 13 |
Doesn't make that much sense for ``pylint`` itself, which is why we're handling the |
| 14 |
exception here, rather than in ``astroid`` |
| 15 |
|
| 16 |
Closes pylint-dev/astroid#644 |
| 17 |
|
| 18 |
* Added a new command line option ``list-groups`` for listing all the check groups ``pylint`` knows about. |
| 19 |
|
| 20 |
* Allow ``BaseException`` for emitting ``broad-except``, just like ``Exception``. |
| 21 |
|
| 22 |
Closes #2741 |
| 23 |
|
| 24 |
* Fixed a crash that occurred for ``bad-str-strip-call`` when ``strip()`` received ``None`` |
| 25 |
|
| 26 |
Closes #2743 |
| 27 |
|
| 28 |
* Don't emit ``*-not-iterating`` checks for builtins consumed by ``itertools`` |
| 29 |
|
| 30 |
Closes #2731 |
| 31 |
|
| 32 |
* Fix a crash caused by iterating over ``Uninferable`` in a string formatting check. |
| 33 |
|
| 34 |
Closes #2727 |
| 35 |
|
| 36 |
* Fixed false positives for ``no-self-argument`` and ``unsubscriptable-object`` when using ``__class_getitem__`` (new in Python 3.7) |
| 37 |
|
| 38 |
Closes #2416 |
| 39 |
|
| 40 |
* Support ``Ellipsis`` as a synonym for ``pass`` statements. |
| 41 |
|
| 42 |
Closes #2718 |
| 43 |
|
| 44 |
* ``fixme`` gets triggered only on comments. |
| 45 |
|
| 46 |
Closes #2321 |
| 47 |
|
| 48 |
* Fixed a false positive for ``unused-variable`` and ``nonlocal`` assignments |
| 49 |
|
| 50 |
Closes #2671 |
| 51 |
|
| 52 |
* Added ``load_configuration()`` hook for plugins |
| 53 |
|
| 54 |
New optional hook for plugins is added: ``load_configuration()``. |
| 55 |
This hook is executed after configuration is loaded to prevent |
| 56 |
overwriting plugin specific configuration via user-based |
| 57 |
configuration. |
| 58 |
|
| 59 |
Closes #2635 |
| 60 |
|
| 61 |
* Fix :ref:`missing-raises-doc` false positive (W9006) |
| 62 |
|
| 63 |
Closes #1502 |
| 64 |
|
| 65 |
* Exempt starred unpacking from ``*-not-iterating`` Python 3 checks |
| 66 |
|
| 67 |
Closes #2651 |
| 68 |
|
| 69 |
* Make ``compare-to-zero`` less zealous by checking against equality and identity |
| 70 |
|
| 71 |
Closes #2645 |
| 72 |
|
| 73 |
* Add ``no-else-raise`` warning (R1720) |
| 74 |
|
| 75 |
Closes #2558 |
| 76 |
|
| 77 |
* Exempt ``yield from`` from ``*-not-iterating`` Python 3 checks. |
| 78 |
|
| 79 |
Closes #2643 |
| 80 |
|
| 81 |
* Fix incorrect generation of ``no-else-return`` warnings (R1705) |
| 82 |
|
| 83 |
Fixed issue where ``if`` statements with nested ``if`` statements |
| 84 |
were incorrectly being flagged as ``no-else-return`` in some cases and |
| 85 |
not being flagged as ``no-else-return`` in other cases. Added tests |
| 86 |
for verification and updated pylint source files to eliminate newly |
| 87 |
exposed warnings. |
| 88 |
|
| 89 |
* Fix false positive with ``not-async-context-manager`` caused by not understanding ``contextlib.asynccontextmanager`` |
| 90 |
|
| 91 |
Closes #2440 |
| 92 |
|
| 93 |
* Refactor ``bad-reversed-sequence`` to account for more objects that can define ``__reversed__`` |
| 94 |
|
| 95 |
One such object would be an enum class, for which ``__reversed__`` yields each individual enum. |
| 96 |
As such, the check for ``bad-reversed-sequence`` needs to not differentiate between classes |
| 97 |
and instances when it comes for checking of ``__reversed__`` presence. |
| 98 |
|
| 99 |
Closes #2598 |
| 100 |
|
| 101 |
* Added ``wrong-exception-operation`` |
| 102 |
|
| 103 |
Used when an operation is done against an exception, but the operation |
| 104 |
is not valid for the exception in question. Usually emitted when having |
| 105 |
binary operations between exceptions in except handlers. |
| 106 |
|
| 107 |
Closes #2494 |
| 108 |
|
| 109 |
* ``no-member`` is emitted for enums when they lack a member |
| 110 |
|
| 111 |
Previously we weren't doing this because we detected a |
| 112 |
``__getattr__`` implementation on the ``Enum`` class |
| 113 |
(and this check is skipped for classes with ``__getattr__``), |
| 114 |
but that is fine for Enums, given that they are inferred in a customised |
| 115 |
way in astroid. |
| 116 |
|
| 117 |
Closes #2565 |
| 118 |
|
| 119 |
* Generalize ``chained-comparison`` |
| 120 |
|
| 121 |
Previous version incorrectly detects `a < b < c and b < d` and fails to |
| 122 |
detect `a < b < c and c < d`. |
| 123 |
|
| 124 |
* Avoid popping __main__ when using multiple jobs |
| 125 |
|
| 126 |
Closes #2689 |
| 127 |
|
| 128 |
* Add a new option 'check-str-concat-over-line-jumps' to check :ref:`implicit-str-concat-in-sequence`' |
| 129 |
|
| 130 |
* Fixes for the new style logging format linter. |
| 131 |
|
| 132 |
The number of arguments was not handled properly, leading to an always |
| 133 |
successful check. |
| 134 |
|
| 135 |
* Fix false positive ``not-callable`` for uninferable properties. |
| 136 |
|
| 137 |
* Fix false positive ``useless-else-on-loop`` if the break is deep in the else |
| 138 |
of an inner loop. |
| 139 |
|
| 140 |
* Minor improvements to the help text for a few options. |