Skip to content

Commit 5159df0

Browse files
committed
Use math fns directly from import math
1 parent 0cc9f3f commit 5159df0

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Moo/play/utils.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44
'''
55

66
import os
7+
import math
78
import time
89

9-
from math import floor, ceil
10-
1110

1211
def file_age(filepath):
1312
'''
@@ -23,15 +22,15 @@ def hours_minutes(seconds, colons=False):
2322
hour = 60 * minute
2423

2524
if seconds >= hour:
26-
hours = floor(seconds / hour)
25+
hours = math.floor(seconds / hour)
2726
seconds = seconds % hour
2827
if colons:
2928
out.append(str(hours).zfill(2))
3029
else:
3130
out.append('{}h'.format(hours))
3231

3332
if seconds >= minute:
34-
minutes = ceil(seconds / minute)
33+
minutes = math.ceil(seconds / minute)
3534
if colons:
3635
out.append(str(minutes).zfill(2))
3736
else:

0 commit comments

Comments
 (0)