Skip to content

Commit a83a4bb

Browse files
committed
update validator
1 parent 6eb8053 commit a83a4bb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/virtualship/utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,6 @@ def mfp_to_yaml(excel_file_path: str, yaml_output_path: str): # noqa: D417
156156

157157
def _validate_numeric_mins_to_timedelta(value: int | float | timedelta) -> timedelta:
158158
"""Convert minutes to timedelta when reading."""
159-
if isinstance(value, (int, float)):
160-
return timedelta(minutes=value)
161-
return value
159+
if isinstance(value, timedelta):
160+
return value
161+
return timedelta(minutes=value)

0 commit comments

Comments
 (0)