fix(aurora): pylint fixes
This commit is contained in:
parent
0d64e3f652
commit
027144f35d
3 changed files with 7 additions and 6 deletions
|
@ -199,10 +199,10 @@ def timedelta_from_string(string: str) -> timedelta:
|
|||
hours, minutes, seconds = map(int, string.split(":"))
|
||||
return timedelta(hours=hours, minutes=minutes, seconds=seconds)
|
||||
|
||||
def timedelta_to_string(timedelta: timedelta) -> str:
|
||||
def timedelta_to_string(td: timedelta) -> str:
|
||||
"""Converts a timedelta object to a string."""
|
||||
days = timedelta.days * 24
|
||||
hours, remainder = divmod(timedelta.seconds, 3600)
|
||||
days = td.days * 24
|
||||
hours, remainder = divmod(td.seconds, 3600)
|
||||
minutes, seconds = divmod(remainder, 60)
|
||||
return f"{days + hours}:{minutes:02}:{seconds:02}"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue