From b917fa47ee94c22f9309a31f8f54d7144eb25524 Mon Sep 17 00:00:00 2001 From: Holger Frey Date: Wed, 23 Aug 2023 10:57:38 +0200 Subject: [PATCH] fixed some typing issues --- src/sensospot_tools/hdr.py | 8 ++++---- src/sensospot_tools/helpers.py | 2 ++ src/sensospot_tools/selection.py | 2 ++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/sensospot_tools/hdr.py b/src/sensospot_tools/hdr.py index 32e1a3e..52e770d 100644 --- a/src/sensospot_tools/hdr.py +++ b/src/sensospot_tools/hdr.py @@ -1,4 +1,4 @@ -from typing import Union +from __future__ import annotations import pandas @@ -8,7 +8,7 @@ from .selection import select def select_hdr_data( data: pandas.DataFrame, - spot_id_columns: Union[list[str], str], + spot_id_columns: str | list[str], time_column: str, overflow_column: str, ) -> pandas.DataFrame: @@ -69,9 +69,9 @@ def select_hdr_data( def normalize( data: pandas.DataFrame, - normalized_time: Union[int, float], + normalized_time: float, time_column: str, - value_columns: Union[list[str], str], + value_columns: str | list[str], template: str = "Normalized.{}", ) -> pandas.DataFrame: """Normalizes values to a normalized exposure time. diff --git a/src/sensospot_tools/helpers.py b/src/sensospot_tools/helpers.py index 609bad2..9ff9011 100644 --- a/src/sensospot_tools/helpers.py +++ b/src/sensospot_tools/helpers.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import itertools from typing import Any diff --git a/src/sensospot_tools/selection.py b/src/sensospot_tools/selection.py index 2fe8865..dec90ed 100644 --- a/src/sensospot_tools/selection.py +++ b/src/sensospot_tools/selection.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from typing import Any, Iterator import pandas