Passed
Push — master ( 518ae3...863c37 )
by manny
46s queued 12s
created

helpers   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 9
rs 10
c 0
b 0
f 0
wmc 2

1 Function

Rating   Name   Duplication   Size   Complexity  
A timer_to_str() 0 5 2
1
from datetime import timedelta
2
3
4
def timer_to_str(timer: timedelta) -> str:
5
    if timer.total_seconds() < 0.0:
6
        return "-0:00:{:04.1f}".format(timer.total_seconds() * -1.0)
7
    else:
8
        return str(timer)[:9]
9