Skip to content

Commit 7c39cfe

Browse files
1Maxnet1gmcrocetti
authored andcommitted
Correct type hint
I was wondering about a warning my IDE showed me. However I think it came from this type hint. As the durations matrix may have set some values to None (at least for Valhalla that is sometimes the case), the type hint should be a Optional list of lists of Optional floats.
1 parent a6b4807 commit 7c39cfe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

routingpy/matrix.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def __init__(self, durations=None, distances=None, raw=None):
3131
self._raw = raw
3232

3333
@property
34-
def durations(self) -> Optional[List[List[float]]]:
34+
def durations(self) -> Optional[List[List[Optional[float]]]]:
3535
"""
3636
The durations matrix as list akin to::
3737

0 commit comments

Comments
 (0)