Annotate the type of steps for mypy

This commit is contained in:
Alexander Hess 2026-11-24 15:52:16 +01:00
commit 3a9dc62b16
Signed by: alexander
GPG key ID: B46EDB4DFC26805D

View file

@ -6,6 +6,7 @@ import functools
import itertools
import json
from typing import List
from typing import Tuple
import folium
import googlemaps as gm
@ -211,7 +212,7 @@ class Path(meta.Base):
# get from A to B. As a step's "start_location" may equal the previous step's
# "end_location", we use an `OrderedSet` to find the unique latitude-longitude
# pairs that make up the path from `.first_address` to `.second_address`.
steps = ordered_set.OrderedSet()
steps: ordered_set.OrderedSet[Tuple[float, float]] = ordered_set.OrderedSet()
for step in route['steps']:
steps.add( # noqa:WPS221
(step['start_location']['lat'], step['start_location']['lng']),