Skip to content

Commit

Permalink
mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
mtache committed Aug 7, 2023
1 parent d8b3ec9 commit 5052085
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion anta/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ async def wrapper(
TestResult: self.result, populated with the correct exit status
"""

def format_td(seconds, digits=3):
def format_td(seconds: float, digits: int = 3) -> str:
isec, fsec = divmod(round(seconds * 10**digits), 10**digits)
return f"{timedelta(seconds=isec)}.{fsec:0{digits}.0f}"

Expand Down

0 comments on commit 5052085

Please sign in to comment.