From 0218fb54d91e7d93843fc9f34e749fb5f74df4a4 Mon Sep 17 00:00:00 2001 From: Ethan Steinberg Date: Fri, 16 Aug 2024 08:51:03 -0700 Subject: [PATCH] Older python support --- src/meds_reader/__init__.py | 4 ++-- tests/api_test.py | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/meds_reader/__init__.py b/src/meds_reader/__init__.py index 0c7ccc3..ac4b348 100644 --- a/src/meds_reader/__init__.py +++ b/src/meds_reader/__init__.py @@ -12,7 +12,7 @@ import sys import warnings from multiprocessing.context import SpawnProcess -from typing import Any, Callable, Iterator, List, Optional, Sequence, Tuple, TypeVar, cast +from typing import Any, Callable, Iterator, List, Optional, Sequence, Tuple, TypeVar, Union, cast import numpy as np import pandas as pd @@ -27,7 +27,7 @@ A = TypeVar("A") -WorkEntry = Tuple[bytes, np.ndarray | pd.DataFrame] +WorkEntry = Tuple[bytes, Union[np.ndarray, pd.DataFrame]] mp = multiprocessing.get_context("spawn") diff --git a/tests/api_test.py b/tests/api_test.py index ba8d736..799a621 100644 --- a/tests/api_test.py +++ b/tests/api_test.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import datetime import json import os