Skip to content

Commit 419789f

Browse files
committed
Use Tuple from typing for type hinting, rather than tuple type
This restores 3.8 compat, which whilst not officially supported is needlessly broken by this
1 parent a2d865c commit 419789f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

s2cell/s2cell.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ def _s2_level_to_size_ij(level: int) -> int:
164164
return 1 << (_S2_MAX_LEVEL - level)
165165

166166

167-
def _s2_point_to_face(s2_point: tuple[float, float, float]) -> int:
167+
def _s2_point_to_face(s2_point: Tuple[float, float, float]) -> int:
168168
"""
169169
Get the face containing a specific S2Point vector.
170170
@@ -192,7 +192,7 @@ def _s2_point_to_face(s2_point: tuple[float, float, float]) -> int:
192192
return face
193193

194194

195-
def _s2_xyz_to_face_uv(s2_point: tuple[float, float, float]) -> tuple[int, float, float]:
195+
def _s2_xyz_to_face_uv(s2_point: Tuple[float, float, float]) -> Tuple[int, float, float]:
196196
"""
197197
Convert S2Point XYZ to face + UV.
198198
@@ -344,7 +344,7 @@ def _s2_init_lookups() -> None:
344344
_S2_LOOKUP_IJ[pos | base_orientation] = ij | orientation
345345

346346

347-
def _s2_cell_id_to_face_ij(cell_id: int) -> tuple[int, int, int]:
347+
def _s2_cell_id_to_face_ij(cell_id: int) -> Tuple[int, int, int]:
348348
"""
349349
Convert S2 cell ID to face + IJ.
350350

0 commit comments

Comments
 (0)