From d25f165a6747cc24a197ac13501e228374e76d9c Mon Sep 17 00:00:00 2001 From: Frederick Jansen Date: Thu, 19 Jan 2023 16:32:59 -0500 Subject: [PATCH] Fix typing on python < 3.9 --- src/polyline/polyline.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/polyline/polyline.py b/src/polyline/polyline.py index 10fbd76..94345a0 100644 --- a/src/polyline/polyline.py +++ b/src/polyline/polyline.py @@ -4,7 +4,7 @@ import io import itertools import math -from typing import List +from typing import List, Tuple def _pcitr(iterable): @@ -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. @@ -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.