aboutsummaryrefslogtreecommitdiff
path: root/uploader/datautils.py
diff options
context:
space:
mode:
Diffstat (limited to 'uploader/datautils.py')
-rw-r--r--uploader/datautils.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/uploader/datautils.py b/uploader/datautils.py
index 2ee079d..46a55c4 100644
--- a/uploader/datautils.py
+++ b/uploader/datautils.py
@@ -1,7 +1,7 @@
"""Generic data utilities: Rename module."""
import math
-from typing import Sequence
from functools import reduce
+from typing import Union, Sequence
def enumerate_sequence(seq: Sequence[dict], start:int = 1) -> Sequence[dict]:
"""Enumerate sequence beginning at 1"""
@@ -28,7 +28,7 @@ def order_by_family(items: tuple[dict, ...],
key=lambda item: item[0][0])
-def safe_int(val: str) -> int:
+def safe_int(val: Union[str, int, float]) -> int:
"""
Convert val into an integer: if val cannot be converted, return a zero.
"""