summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorArianna Y <92831762+areveny@users.noreply.github.com>2021-10-25 02:09:43 -0500
committerGitHub <noreply@github.com>2021-10-25 09:09:43 +0200
commited3449fee063d91f050c6b733030d3b3d7ad719f (patch)
tree3d5d640e824a1e3c9efc99b5281ce17ac3c4d575 /doc
parentbfc8d32273102495ee1cfd8daa14d9b6693b11f7 (diff)
downloadpylint-git-ed3449fee063d91f050c6b733030d3b3d7ad719f.tar.gz
Add extension checker that suggests any/all statements from for loops (#5196)
* Add extension checker that suggests any/all statements from for loops * Suggest all/not all: If there are negated conditions, we can suggest an all/not all statement to move the 'not' out of the comprehension and call it only once. Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/whatsnew/2.12.rst4
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/whatsnew/2.12.rst b/doc/whatsnew/2.12.rst
index 1126ebd53..8b5b5f0c2 100644
--- a/doc/whatsnew/2.12.rst
+++ b/doc/whatsnew/2.12.rst
@@ -50,7 +50,11 @@ Removed checkers
Extensions
==========
+* Added an optional extension ``consider-using-any-or-all``: Emitted when a ``for`` loop only
+ produces a boolean and could be replaced by ``any`` or ``all`` using a generator. Also suggests
+ a suitable any/all statement if it is concise.
+ Closes #5008
Other Changes
=============