Skip to content

Commit

Permalink
Fix typing on python < 3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
frederickjansen committed Jan 19, 2023
1 parent bf5caf9 commit d25f165
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/polyline/polyline.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import io
import itertools
import math
from typing import List
from typing import List, Tuple


def _pcitr(iterable):
Expand Down Expand Up @@ -44,7 +44,7 @@ def _trans(value, index):
return ~(result >> 1) if comp else (result >> 1), index


def decode(expression: str, precision: int = 5, geojson: bool = False) -> List[tuple[float, float]]:
def decode(expression: str, precision: int = 5, geojson: bool = False) -> List[Tuple[float, float]]:
"""
Decode a polyline string into a set of coordinates.
Expand All @@ -69,7 +69,7 @@ def decode(expression: str, precision: int = 5, geojson: bool = False) -> List[t
return coordinates


def encode(coordinates: List[tuple[float, float]], precision: int = 5, geojson: bool = False) -> str:
def encode(coordinates: List[Tuple[float, float]], precision: int = 5, geojson: bool = False) -> str:
"""
Encode a set of coordinates in a polyline string.
Expand Down

0 comments on commit d25f165

Please sign in to comment.