Debian Codegraph @

doc/whatsnew/2/2.2/full.rst

raw
1 Full changelog
2 ==============
3
4 What's New in Pylint 2.2.2?
5 ---------------------------
6 Release date: 2018-11-28
7
8 * Change the ``logging-format-style`` to use name identifier instead of their
9 corresponding Python identifiers
10
11 This is to prevent users having to think about escaping the default value for
12 ``logging-format-style`` in the generated config file. Also our config parsing
13 utilities don't quite support escaped values when it comes to ``choices`` detection,
14 so this would have needed various hacks around that.
15
16 Closes #2614
17
18
19 What's New in Pylint 2.2.1?
20 ---------------------------
21 Release date: 2018-11-27
22
23 * Fix a crash caused by ``implicit-str-concat-in-sequence`` and multi-bytes characters.
24
25 Closes #2610
26
27
28 What's New in Pylint 2.2?
29 -------------------------
30
31 Release date: 2018-11-25
32
33 * Consider ``range()`` objects for ``undefined-loop-variable`` leaking from iteration.
34
35 Closes #2533
36
37 * ``deprecated-method`` can use the attribute name for identifying a deprecated method
38
39 Previously we were using the fully qualified name, which we still do, but the fully
40 qualified name for some ``unittest`` deprecated aliases leads to a generic
41 deprecation function. Instead on relying on that, we now also rely on the attribute
42 name, which should solve some false positives.
43
44 Closes #1653
45 Closes #1946
46
47 * Fix compatibility with changes to stdlib tokenizer.
48
49 * ``pylint`` is less eager to consume the whole line for pragmas
50
51 Closes #2485
52
53 * Obtain the correct number of CPUs for virtualized or containerized environments.
54
55 Closes #2519
56
57 * Change ``unbalanced-tuple-unpacking`` back to a warning.
58
59 It used to be a warning until a couple of years ago, after it was promoted to
60 an error. But the check might be suggesting the wrong thing in some cases,
61 for instance when checking against ``sys.argv`` which cannot be known at static
62 analysis time. Given it might rely on potential unknown data, it's best to
63 have it as a warning.
64
65 Closes #2522
66
67 * Remove ``enumerate`` usage suggestion when defining ``__iter__`` (C0200)
68
69 Closes #2477
70
71 * Emit ``too-many-starred-assignment`` only when the number of Starred nodes is per assignment elements
72
73 Closes #2513
74
75 * ``try-except-raise`` checker now handles multilevel inheritance hirerachy for exceptions correctly.
76
77 Closes #2484
78
79 * Add a new check, ``simplifiable-if-expression`` for expressions like ``True if cond else False``.
80
81 Closes #2487
82
83 * ``too-few-public-methods`` is not reported for ``typing.NamedTuple``
84
85 Closes #2459
86
87 * ```too-few-public-methods`` is not reported for dataclasses created with options.
88
89 Closes #2488
90
91 * Remove wrong modules from 'bad-python3-import'.
92
93 Closes #2453
94
95 * The ``json`` reporter prints an empty list when no messages are emitted
96
97 Closes #2446
98
99 * Add a new check, ``duplicate-string-formatting-argument``
100
101 This new check is emitted whenever a duplicate string formatting argument
102 is found.
103
104 Closes #497
105
106 * ``assignment-from-no-return`` is not emitted for coroutines.
107
108 Closes #1715
109
110 * Report format string type mismatches.
111
112 * ``consider-using-ternary`` and ``simplified-boolean-expression`` no longer emit for sequence based checks
113
114 Closes #2473
115
116 * Handle ``AstroidSyntaxError`` when trying to import a module.
117
118 Closes #2313
119
120 * Allow ``__module__`` to be redefined at a class level.
121
122 Closes #2451
123
124 * ``pylint`` used to emit an ``unused-variable`` error if unused import was found in the function. Now instead of
125 ``unused-variable``, ``unused-import`` is emitted.
126
127 Closes #2421
128
129 * Handle asyncio.coroutine when looking for ``not-an-iterable`` check.
130
131 Closes #996
132
133 * The ``locally-enabled`` check is gone.
134
135 Closes #2442
136
137 * Infer decorated methods when looking for method-hidden
138
139 Closes #2369
140
141 * Pick the latest value from the inferred values when looking for ``raising-non-exception``
142
143 Closes #2431
144
145 * Extend the TYPE_CHECKING guard to TYPE_CHECKING name as well, not just the attribute
146
147 Closes #2411
148
149 * Ignore import x.y.z as z cases for checker ``useless-import-alias``.
150
151 Closes #2309
152
153 * Fix false positive ``undefined-variable`` and ``used-before-assignment`` with nonlocal keyword usage.
154
155 Closes #2049
156
157 * Stop ``protected-access`` exception for missing class attributes
158
159 * Don't emit ``assignment-from-no-return`` for decorated function nodes
160
161 Closes #2385
162
163 * ``unnecessary-pass`` is now also emitted when a function or class contains only docstring and pass statement.
164
165 In Python, stubbed functions often have a body that contains just a single ``pass`` statement,
166 indicating that the function doesn't do anything. However, a stubbed function can also have just a
167 docstring, and function with a docstring and no body also does nothing.
168
169 Closes #2208
170
171 * ``duplicate-argument-name`` is emitted for more than one duplicate argument per function
172
173 Closes #1712
174
175 * Allow double indentation levels for more distinguishable indentations
176
177 Closes #741
178
179 * Consider tuples in exception handler for ``try-except-raise``.
180
181 Closes #2389
182
183 * Fix astroid.ClassDef check in checkers.utils.is_subclass_of
184
185 * Fix wildcard imports being ignored by the import checker
186
187 * Fix external/internal distinction being broken in the import graph
188
189 * Fix wildcard import check not skipping ``__init__.py``
190
191 Closes #2430
192
193 * Add new option to logging checker, ``logging_format_style``
194
195 * Fix --ignore-imports to understand multi-line imports
196
197 Closes #1422
198 Closes #2019
199
200 * Add a new check 'implicit-str-concat-in-sequence' to spot string concatenation inside lists, sets & tuples.
201
202 * ``literal-comparison`` is now emitted for 0 and 1 literals.