diff --git a/weldx/util/media_file.py b/weldx/util/media_file.py index 339eb9e62..cba0e0436 100644 --- a/weldx/util/media_file.py +++ b/weldx/util/media_file.py @@ -2,7 +2,7 @@ from __future__ import annotations from pathlib import Path -from typing import Union, get_args, get_type_hints +from typing import Union, get_args import numpy as np import pandas as pd @@ -136,8 +136,7 @@ def _init_from_sequence( resolution=(image.width, image.height), nframes=len(path_or_array), ) - _ref_time_types = get_type_hints(MediaFile.__init__)["reference_time"] - if not isinstance(reference_time, get_args(_ref_time_types)): + if reference_time is not None and not isinstance(reference_time, pd.Timestamp): raise ValueError( f"unsupported type for reference_time {type(reference_time)}" )