fix(aurora): pylint fixes
All checks were successful
Actions / Build Documentation (MkDocs) (pull_request) Successful in 30s
Actions / Lint Code (Ruff & Pylint) (pull_request) Successful in 49s

This commit is contained in:
Seaswimmer 2024-06-04 23:55:55 -04:00
parent 0d64e3f652
commit 027144f35d
Signed by: cswimr
GPG key ID: 5D671B5D03D65A7F
3 changed files with 7 additions and 6 deletions

View file

@ -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}"