less-than-1.0 should be to_pretty_time "0s"

This commit is contained in:
jesopo 2020-02-28 22:56:45 +00:00
parent 7dea6f04a9
commit 078d8ecd6b

View file

@ -50,7 +50,7 @@ def time_unit(seconds: int) -> typing.Tuple[int, str]:
def to_pretty_time(total_seconds: int, max_units: int=UNIT_MINIMUM, def to_pretty_time(total_seconds: int, max_units: int=UNIT_MINIMUM,
direction: typing.Optional[RelativeDirection]=None) -> str: direction: typing.Optional[RelativeDirection]=None) -> str:
if total_seconds == 0: if total_seconds < 1:
return "0s" return "0s"
if not direction == None: if not direction == None: