Skip to content

Commit

Permalink
fix: Python < 3.10 support on typing
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafiot committed Jan 17, 2024
1 parent 989731c commit f11681a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pymisp/api.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -57,7 +57,7 @@ def cached_property(func): # type: ignore

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)

Expand Down

0 comments on commit f11681a

Please sign in to comment.