Skip to content

Commit

Permalink
Make types-requests match requests version to as they're meant to be …
Browse files Browse the repository at this point in the history
…aligned, also updated for the new DATA definition in types-requests
  • Loading branch information
Sigurd-Borge committed Sep 24, 2024
1 parent 784e45c commit 490f8da
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
11 changes: 9 additions & 2 deletions src/antares/api_conf/request_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 490f8da

Please sign in to comment.