Skip to content

Commit

Permalink
Correct type hint
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
1Maxnet1 authored Aug 15, 2024
1 parent a86cee6 commit d8c9bf6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion routingpy/matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def __init__(self, durations=None, distances=None, raw=None):
self._raw = raw

@property
def durations(self) -> Optional[List[List[float]]]:
def durations(self) -> Optional[List[List[Optional[float]]]]:
"""
The durations matrix as list akin to::
Expand Down

0 comments on commit d8c9bf6

Please sign in to comment.