You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Comprehension inside of 'any', 'all', 'max', 'min' or 'sum' is unnecessary. A generator would be sufficient and faster.
from random import randint
all([randint(-5, 5) > 0 for _ in range(10)]) # [use-a-generator]
any([randint(-5, 5) > 0 for _ in range(10)]) # [use-a-generator]
Is ruff unnecessary-map C417 actually equivalent to pylint use-a-generator R1729?
In #970,
use-a-generator
is marked as complete via ruff rule C417 unnecessary-map.The docs for pylint use-a-generator R1729 state:
While the docs for ruff C417 unnecessary-map state:
Are they not actually equivalent? Or are docs incorrect?
If they're not equivalent, can the comment in #970 be updated?
I also found #3259 which appears to be related.
The text was updated successfully, but these errors were encountered: