Fix linting issues

This commit is contained in:
Christopher C. Wells 2019-11-09 15:21:54 -08:00 committed by Christopher Charbonneau Wells
parent 482f7242c2
commit d5509bdb52
1 changed files with 10 additions and 6 deletions

View File

@ -18,15 +18,19 @@ def duration_string(duration, precision='s'):
if m > 0 and precision != 'h':
if duration != '':
duration += ', '
duration += ngettext('%(minutes)s minute', '%(minutes)s minutes', m) % {
'minutes': m
}
duration += ngettext(
'%(minutes)s minute',
'%(minutes)s minutes',
m
) % {'minutes': m}
if s > 0 and precision != 'h' and precision != 'm':
if duration != '':
duration += ', '
duration += ngettext('%(seconds)s second', '%(seconds)s seconds', s) % {
'seconds': s
}
duration += ngettext(
'%(seconds)s second',
'%(seconds)s seconds',
s
) % {'seconds': s}
return duration