Annotate the type of steps for mypy
This commit is contained in:
parent
39cf160b95
commit
db1b23cd99
1 changed files with 2 additions and 1 deletions
|
|
@ -6,6 +6,7 @@ import functools
|
||||||
import itertools
|
import itertools
|
||||||
import json
|
import json
|
||||||
from typing import List
|
from typing import List
|
||||||
|
from typing import Tuple
|
||||||
|
|
||||||
import folium
|
import folium
|
||||||
import googlemaps as gm
|
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
|
# 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
|
# "end_location", we use an `OrderedSet` to find the unique latitude-longitude
|
||||||
# pairs that make up the path from `.first_address` to `.second_address`.
|
# 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']:
|
for step in route['steps']:
|
||||||
steps.add( # noqa:WPS221
|
steps.add( # noqa:WPS221
|
||||||
(step['start_location']['lat'], step['start_location']['lng']),
|
(step['start_location']['lat'], step['start_location']['lng']),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue