Skip to content

Commit

Permalink
Use python 3.9 compatible type hint
Browse files Browse the repository at this point in the history
  • Loading branch information
merydian committed May 17, 2024
1 parent f5631f4 commit 3a1e091
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ORStools/utils/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
***************************************************************************/
"""

from typing import Union


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


def decode_extrainfo(extra_info: str, key: int) -> str | int:
def decode_extrainfo(extra_info: str, key: int) -> Union[int, str]:
waytypes = [
"Unknown",
"state Road",
Expand Down

0 comments on commit 3a1e091

Please sign in to comment.