diff options
author | Arianna Y <92831762+areveny@users.noreply.github.com> | 2021-10-25 02:09:43 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-25 09:09:43 +0200 |
commit | ed3449fee063d91f050c6b733030d3b3d7ad719f (patch) | |
tree | 3d5d640e824a1e3c9efc99b5281ce17ac3c4d575 /doc | |
parent | bfc8d32273102495ee1cfd8daa14d9b6693b11f7 (diff) | |
download | pylint-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.rst | 4 |
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 ============= |