From f11681af528f147ca6939706a085e833ab7dded3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Wed, 17 Jan 2024 13:38:00 +0100 Subject: [PATCH] fix: Python < 3.10 support on typing --- pymisp/api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pymisp/api.py b/pymisp/api.py index eaadb99..80872f3 100644 --- a/pymisp/api.py +++ b/pymisp/api.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import TypeVar, Any, Mapping, Iterable, MutableMapping +from typing import TypeVar, Any, Mapping, Iterable, MutableMapping, Union from datetime import date, datetime import csv from pathlib import Path @@ -57,7 +57,7 @@ except ImportError: SearchType = TypeVar('SearchType', str, int) # str: string to search / list: values to search (OR) / dict: {'OR': [list], 'NOT': [list], 'AND': [list]} -SearchParameterTypes = TypeVar('SearchParameterTypes', str, list[str | int], dict[str, str | int]) +SearchParameterTypes = TypeVar('SearchParameterTypes', str, list[Union[str, int]], dict[str, Union[str, int]]) ToIDSType = TypeVar('ToIDSType', str, int, bool)