fix: Typing for Python < 3.10

pull/1182/head
Raphaël Vinot 2024-03-22 11:40:45 +01:00
parent 2b66a3eabd
commit b11aa31048
1 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
from __future__ import annotations 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 from datetime import date, datetime
import csv import csv
from pathlib import Path from pathlib import Path
@ -57,7 +57,7 @@ except ImportError:
SearchType = TypeVar('SearchType', str, int) SearchType = TypeVar('SearchType', str, int)
# str: string to search / list: values to search (OR) / dict: {'OR': [list], 'NOT': [list], 'AND': [list]} # 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) ToIDSType = TypeVar('ToIDSType', str, int, bool)