diff --git a/requirements-dev.txt b/requirements-dev.txt index 89752773..021fc3bf 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -3,6 +3,6 @@ mypy~=1.10.0 ruff~=0.4.7 pytest-cov~=5.0.0 requests-mock~=1.12.1 -types-requests~=2.27.1 +types-requests~=2.31.0 tox~=4.18.1 tox-uv~=1.11.3 diff --git a/src/antares/api_conf/request_wrapper.py b/src/antares/api_conf/request_wrapper.py index d0904c5c..d31a5a2d 100644 --- a/src/antares/api_conf/request_wrapper.py +++ b/src/antares/api_conf/request_wrapper.py @@ -11,13 +11,20 @@ # This file is part of the Antares project. import json -from typing import IO, Any, Iterable, Mapping, Optional, Tuple, Union +from typing import Any, Iterable, Mapping, Optional, Union import requests from antares.exceptions.exceptions import APIError -DATA_TYPE = Union[str, bytes, Mapping[str, Any], Iterable[Tuple[str, Optional[str]]], IO] +DATA_TYPE = Union[ + Iterable[bytes], + str, + bytes, + list[tuple[Any, Any]], + tuple[tuple[Any, Any], ...], + Mapping[Any, Any], +] def _handle_exceptions(response: requests.Response) -> requests.Response: