From 9c8a0e26e4c1ca3e2c6032f91d1dadab114f67d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=BDiga=20Luk=C5=A1i=C4=8D?= <31988337+zigaLuksic@users.noreply.github.com> Date: Wed, 11 Oct 2023 09:05:39 +0200 Subject: [PATCH 1/2] add comment to ignore mypy mistake (#482) --- sentinelhub/areas.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sentinelhub/areas.py b/sentinelhub/areas.py index 9ff4a762..c27f97ea 100644 --- a/sentinelhub/areas.py +++ b/sentinelhub/areas.py @@ -711,7 +711,7 @@ def _parse_to_pair(parameter: T | tuple[T, T], allowed_types: tuple[type, ...], parameter = cast(T, parameter) if isinstance(parameter, allowed_types): - return parameter, parameter + return parameter, parameter # type: ignore[return-value] # mypy 1.6 fails to do type narrowing here raise ValueError( f"Parameter {param_name} must be a single instance or a pair, with allowed types {allowed_types}, but" From e4f9a3189ac3d28ea2549924bf812b7a4bc70da7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=BDiga=20Luk=C5=A1i=C4=8D?= <31988337+zigaLuksic@users.noreply.github.com> Date: Tue, 24 Oct 2023 14:15:43 +0200 Subject: [PATCH 2/2] Adjust how client credentials are sent to token service (#483) --- sentinelhub/download/session.py | 1 + 1 file changed, 1 insertion(+) diff --git a/sentinelhub/download/session.py b/sentinelhub/download/session.py index c86b7b06..e7205a3b 100644 --- a/sentinelhub/download/session.py +++ b/sentinelhub/download/session.py @@ -146,6 +146,7 @@ def _fetch_token(self, request: DownloadRequest) -> JsonDict: client_id=self.config.sh_client_id, client_secret=self.config.sh_client_secret, headers={**self.DEFAULT_HEADERS, **SHConstants.HEADERS}, + include_client_id=True, ) @staticmethod