Skip to content

Commit

Permalink
add float to type anno
Browse files Browse the repository at this point in the history
  • Loading branch information
janosh authored and gpetretto committed Jul 25, 2024
1 parent 120bfaf commit 9e403bd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/qtoolkit/io/pbs.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ def _convert_memory_str(memory: str | None) -> int | None:
}

@staticmethod
def _convert_time_to_str(time: int | timedelta) -> str:
def _convert_time_to_str(time: int | float | timedelta) -> str:
if not isinstance(time, timedelta):
time = timedelta(seconds=time)

Expand Down
2 changes: 1 addition & 1 deletion src/qtoolkit/io/slurm.py
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ def _convert_memory_str(memory: str | None) -> int | None:
return v * (1024 ** power_labels[units])

@staticmethod
def _convert_time_to_str(time: int | timedelta) -> str:
def _convert_time_to_str(time: int | float | timedelta) -> str:
if not isinstance(time, timedelta):
time = timedelta(seconds=time)

Expand Down

0 comments on commit 9e403bd

Please sign in to comment.