Skip to content

Commit eece0f9

Browse files
merydiankoebi
authored andcommitted
Use python 3.9 compatible type hint
1 parent f5631f4 commit eece0f9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ORStools/utils/convert.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
***************************************************************************/
2828
"""
2929

30+
from typing import Union
31+
3032

3133
def decode_polyline(polyline: str, is3d: bool = False) -> list:
3234
"""Decodes a Polyline string into a GeoJSON geometry.
@@ -89,7 +91,7 @@ def decode_polyline(polyline: str, is3d: bool = False) -> list:
8991
return points
9092

9193

92-
def decode_extrainfo(extra_info: str, key: int) -> str | int:
94+
def decode_extrainfo(extra_info: str, key: int) -> Union[int, str]:
9395
waytypes = [
9496
"Unknown",
9597
"state Road",

0 commit comments

Comments
 (0)