fix failing tests

This commit is contained in:
James Turk 2022-11-10 21:37:47 -06:00
parent 041518e760
commit b832b098ca

View File

@ -1,5 +1,4 @@
from saucebrush.filters import Filter
from saucebrush.utils import FallbackCounter
import collections
import math
@ -202,10 +201,7 @@ class Histogram(StatsFilter):
def __init__(self, field, **kwargs):
super(Histogram, self).__init__(field, **kwargs)
if hasattr(collections, "Counter"):
self._counter = collections.Counter()
else:
self._counter = FallbackCounter()
self._counter = collections.Counter()
def process_field(self, item):
self._counter[self.prep_field(item)] += 1