graphite-project / carbon

Carbon is one of the components of Graphite, and is responsible for receiving metrics over the network and writing them down to disk using a storage backend.
http://graphite.readthedocs.org/
Apache License 2.0
1.5k stars 490 forks source link

(PTC-W0016) Unnecessary comprehension #908

Closed rohankhanna closed 3 years ago

rohankhanna commented 3 years ago

Description

The built-in function being used does not require comprehension and can work directly with a generator expression. Using a generator expession within these functions is faster than using a comprehension. - all - any - enumerate - iter - itertools.cycle - itertools.accumulate **_Note: The inbuilt functions all() and any() in …

Occurrences

There are 2 occurrences of this issue in the repository.

See all occurrences on DeepSource → deepsource.io/gh/graphite-project/carbon/issue/PTC-W0016/occurrences/