Skip to content

Commit 37cf270

Browse files
committed
Default values
1 parent 15b094f commit 37cf270

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

term_timer/stats.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ def score(self) -> float:
206206
def repartition(self) -> list[tuple[int, int]]:
207207
gap = (self.worst - self.best) / SECOND
208208

209-
best_bin = STATS_CONFIG.get('distribution')
209+
best_bin = STATS_CONFIG.get('distribution', 0)
210210
if not best_bin:
211211
for second in SECOND_BINS:
212212
if gap / 10 < second:
@@ -521,7 +521,7 @@ def detail(self, solve_id: int, method: str, orientation: str,
521521

522522
metrics_dict = solve.reconstruction.metrics._asdict()
523523
metric_string = '[stats]Metrics :[/stats] '
524-
for metric in STATS_CONFIG.get('metrics'):
524+
for metric in STATS_CONFIG.get('metrics', []):
525525
value = metrics_dict[metric]
526526
metric_string += (
527527
f'[{ metric }]{ value } { metric.upper() }[/{ metric }] '

0 commit comments

Comments
 (0)