Skip to content

Commit fa6f551

Browse files
committed
mypy fixes
1 parent 626a181 commit fa6f551

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

sentinelhub/api/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
letter_case=LetterCase.CAMEL,
2222
)
2323

24-
geometry_config = dataclass_config( # type: ignore[misc]
24+
geometry_config = dataclass_config(
2525
encoder=Geometry.get_geojson,
2626
decoder=lambda geojson: Geometry.from_geojson(geojson) if geojson else None,
2727
exclude=lambda geojson: geojson is None,
@@ -31,7 +31,7 @@
3131

3232
def enum_config(enum_class: Type[Enum]) -> Dict[str, dict]:
3333
"""Given an Enum class it provide an object for serialization/deserialization"""
34-
return dataclass_config( # type: ignore[misc]
34+
return dataclass_config(
3535
encoder=lambda enum_item: enum_item.value,
3636
decoder=lambda item: enum_class(item) if item else None,
3737
exclude=lambda item: item is None,

sentinelhub/geometry.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import warnings
77
from abc import ABCMeta, abstractmethod
88
from math import ceil
9-
from typing import Callable, Dict, Iterator, Tuple, TypeVar, Union, cast
9+
from typing import Callable, Dict, Iterator, Tuple, TypeVar, Union
1010

1111
import shapely.geometry
1212
import shapely.geometry.base
@@ -159,9 +159,9 @@ def _tuple_from_list_or_tuple(
159159
:raises: TypeError
160160
"""
161161
if len(bbox) == 4:
162-
min_x, min_y, max_x, max_y = cast(Tuple[float, float, float, float], bbox)
162+
min_x, min_y, max_x, max_y = bbox
163163
else:
164-
(min_x, min_y), (max_x, max_y) = cast(Tuple[Tuple[float, float], Tuple[float, float]], bbox)
164+
(min_x, min_y), (max_x, max_y) = bbox
165165
return float(min_x), float(min_y), float(max_x), float(max_y)
166166

167167
@staticmethod

0 commit comments

Comments
 (0)