Debian Codegraph @

doc/whatsnew/2/2.1/summary.rst

raw
1 :Release: 2.1
2 :Date: 2018-08-01
3
4 Summary -- Release highlights
5 =============================
6
7 * This release mostly includes fixes for bugs found after the launch of 2.0.
8
9 New checkers
10 ============
11
12 * A new check was added, ``misplaced-format-function``.
13
14 This message is emitted when pylint detects that a format function is called on non str object.
15 This can occur due to wrong placement of closing bracket, e.g
16
17 .. code-block:: python
18
19 print('value: {}').format(123) # bad
20
21 print('value: {}'.format(123)) # good
22
23
24 Other Changes
25 =============
26
27 * ``try-except-raise`` check was demoted from an error to a warning, as part of issue #2323.
28
29 * Correctly handle the new name of the Python implementation of the ``abc`` module.
30
31 In Python 3.7, the ``abc`` module has both a C implementation as well as a Python one,
32 but the Python implementation has a different file name that what ``pylint`` was expecting,
33 resulting in some checks getting confused.
34
35 * Modules with ``__getattr__`` are exempted by default from ``no-member``
36
37 There's no easy way to figure out if a module has a particular member when
38 the said module uses ``__getattr__``, which is a new addition to Python 3.7.
39 Instead we assume the safe thing to do, in the same way we do for classes,
40 and skip those modules from checking.
41
42
43 * ``invalid name`` is no longer triggered for function and attribute names longer
44 than 30 characters. The upper limit was removed completely.
45
46
47 * Fix false-positive ``undefined-variable`` for self referential class name in lamdbas
48
49 * ``no-else-return`` also specifies the type of the branch that is causing the error.
50
51 * Fixed inconsistent behaviour for bad-continuation on first line of file.
52
53 * Fixed a bug where ``pylint`` was not able to disable certain messages on the last line through
54 the global disable option.
55
56 * ``pylint`` no longer emits ``useless-return`` when it finds a single statement that is the ``return`` itself
57
58 We still want to be explicit when a function is supposed to return
59 an optional value; even though ``pass`` could still work, it's not explicit
60 enough and the function might look like it's missing an implementation.
61
62 * Fixed a bug where ``pylint`` was crashing when being unable to infer the value of an argument to ``next()``
63
64
65 * ``pylint`` no longer emit ``not-an-iterable`` when dealing with async iterators.
66
67 * ``pylint`` gained the ability to specify a default docstring type for when the check cannot guess the type
68
69 For this we added a ``--default-docstring-type`` command line option.