code format with black

This commit is contained in:
Jakob Ketterl
2019-08-11 11:37:45 +02:00
parent 92321a3b4e
commit d467d79bdf
5 changed files with 24 additions and 20 deletions

View File

@ -10,21 +10,19 @@ class Metrics(object):
def __init__(self):
self.metrics = {}
def pushDecodes(self, band, mode, count = 1):
def pushDecodes(self, band, mode, count=1):
if band is None:
band = 'unknown'
band = "unknown"
else:
band = band.getName()
if mode is None:
mode = 'unknown'
mode = "unknown"
if not band in self.metrics:
self.metrics[band] = {}
if not mode in self.metrics[band]:
self.metrics[band][mode] = {
"count": 0
}
self.metrics[band][mode] = {"count": 0}
self.metrics[band][mode]["count"] += count