From 9e403bdb2fb51fcac110befebb1104e0ed1aa019 Mon Sep 17 00:00:00 2001 From: Janosh Riebesell Date: Thu, 25 Jul 2024 06:45:50 -0400 Subject: [PATCH] add float to type anno --- src/qtoolkit/io/pbs.py | 2 +- src/qtoolkit/io/slurm.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qtoolkit/io/pbs.py b/src/qtoolkit/io/pbs.py index da4af02..22f6fce 100644 --- a/src/qtoolkit/io/pbs.py +++ b/src/qtoolkit/io/pbs.py @@ -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) diff --git a/src/qtoolkit/io/slurm.py b/src/qtoolkit/io/slurm.py index 38bd4cf..e555092 100644 --- a/src/qtoolkit/io/slurm.py +++ b/src/qtoolkit/io/slurm.py @@ -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)