Skip to content

Commit a9676fe

Browse files
committed
Fixing typo
1 parent 18d2a94 commit a9676fe

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

nextplot/osrm.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class OsrmRouteRequest:
1616

1717

1818
@dataclasses.dataclass
19-
class OsrRouteResponse:
19+
class OsrmRouteResponse:
2020
paths: list[list[types.Position]]
2121
distances: list[float]
2222
durations: list[float]
@@ -27,7 +27,7 @@ class OsrRouteResponse:
2727
def query_route(
2828
endpoint: str,
2929
route: OsrmRouteRequest,
30-
) -> OsrRouteResponse:
30+
) -> OsrmRouteResponse:
3131
"""
3232
Queries a route from the OSRM server.
3333
"""
@@ -54,7 +54,7 @@ def query_route(
5454
)
5555
distances.append(common.haversine(f, t))
5656
durations.append(common.haversine(f, t) / TRAVEL_SPEED)
57-
return OsrRouteResponse(paths=paths, distances=distances, durations=durations, no_route=True)
57+
return OsrmRouteResponse(paths=paths, distances=distances, durations=durations, no_route=True)
5858
# Make sure we are not getting an error
5959
response.raise_for_status()
6060
except requests.exceptions.RequestException as e:
@@ -103,13 +103,13 @@ def query_route(
103103
print(f"Warning: number of legs ({len(legs)}) does not match number of positions ({len(route.positions)} - 1)")
104104

105105
# Extract route
106-
return OsrRouteResponse(paths=legs, distances=distances, durations=durations, zero_distance=all_zero_distances)
106+
return OsrmRouteResponse(paths=legs, distances=distances, durations=durations, zero_distance=all_zero_distances)
107107

108108

109109
def query_routes(
110110
endpoint: str,
111111
routes: list[types.Route],
112-
) -> list[OsrRouteResponse]:
112+
) -> list[OsrmRouteResponse]:
113113
"""
114114
Queries multiple routes from the OSRM server.
115115

0 commit comments

Comments
 (0)