Skip to content

Commit 25a92f1

Browse files
committed
Add consider-using-generator in ChangeLog and whatsnew
1 parent 279618e commit 25a92f1

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

CONTRIBUTORS.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,3 +358,6 @@ contributors:
358358
* Matthijs Blom: contributor
359359

360360
* Andy Palmer: contributor
361+
362+
* Ikraduya Edian: contributor
363+
Added new check 'consider-using-generator'.

ChangeLog

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ What's New in Pylint 2.5.0?
77

88
Release date: TBA
99

10+
* New check: ``consider-using-generator``
11+
12+
This check warns when comprehension used inside `any` or `all` function
13+
since it is unnecessary and should be replaced by a generator instead.
14+
Using generator would be less code and way faster.
15+
16+
Close #3165
17+
1018
* Add a check for non string assignment to __name__ attribute.
1119

1220
Close #583

doc/whatsnew/2.5.rst

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ Summary -- Release highlights
1313
New checkers
1414
============
1515

16+
* A new check ``consider-using-generator`` was added.
17+
18+
This check is emitted whenever **pylint** detects the use
19+
of list comprehension inside ``any`` or ``all`` function.
20+
The comprehension should be replaced by a generator
21+
instead since it would be less code and way faster.
22+
1623
* A new check ``f-string-without-interpolation`` was added.
1724

1825
This check is emitted whenever **pylint** detects the use of an
@@ -67,4 +74,4 @@ separated list of regexes, that if a name matches will be always marked as a bla
6774

6875
* Add new --fail-under flag for setting the threshold for the score to fail overall tests. If the score is over the fail-under threshold, pylint will complete SystemExit with value 0 to indicate no errors.
6976

70-
* Add a new check (non-str-assignment-to-dunder-name) to ensure that only strings are assigned to ``__name__`` attributes
77+
* Add a new check (non-str-assignment-to-dunder-name) to ensure that only strings are assigned to ``__name__`` attributes

0 commit comments

Comments
 (0)