From d8c9bf6974b8b670d021f40f1698413d37b89505 Mon Sep 17 00:00:00 2001 From: Max Buchholz Date: Thu, 15 Aug 2024 17:18:08 +0200 Subject: [PATCH] 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. --- routingpy/matrix.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routingpy/matrix.py b/routingpy/matrix.py index c649f46..79899cb 100644 --- a/routingpy/matrix.py +++ b/routingpy/matrix.py @@ -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::