graphite-project / carbon

Consider using literal syntax to create the data structure PTC-W0019
Performance
Minor
4 years ago4 years old
unnecessary dict call - write as literal
 55  setup_kwargs = dict(zip_safe=0)
 56else:
 57  from distutils.core import setup
 58  setup_kwargs = dict() 59
 60
 61storage_dirs = [ ('storage/ceres/dummy.txt', []), ('storage/whisper/dummy.txt',[]),
unnecessary list call - write as literal
175
176        # No bucket of this size exists, create it
177        while nr_points > len(self.buckets):
178            self.buckets.append(list())179
180        # Remove existing metrics from its bucket
181        if nr_points > 1:
unnecessary list call - write as literal
155    pop().
156    """
157    def __init__(self, cache):
158        self.buckets = list()159        super(BucketMaxStrategy, self).__init__(cache)
160
161    def choose_item(self):
unnecessary dict call - write as literal
 19  elif size > 0:
 20    return LRUCache(size)
 21  else:
 22    return dict() 23
 24
 25class RuleManager(object):