-
Notifications
You must be signed in to change notification settings - Fork 224
Open
Description
Lines 755 to 777 in 09fc46b
| def length_2d(self) -> Optional[float]: | |
| """ | |
| Computes 2-dimensional length (meters) of segment (only latitude and | |
| longitude, no elevation). | |
| Returns | |
| ---------- | |
| length : float | |
| Length returned in meters | |
| """ | |
| return mod_geo.length_2d(self.points) # type: ignore | |
| def length_3d(self) -> float: | |
| """ | |
| Computes 3-dimensional length of segment (latitude, longitude, and | |
| elevation). | |
| Returns | |
| ---------- | |
| length : float | |
| Length returned in meters | |
| """ | |
| return mod_geo.length_3d(self.points) # type: ignore |
Why is length_2d marked as returning Optional[float]?
length_3d does not. GPXTrack and GPX's versions of length_2d are marked as plain float.
Is this a typings bug? Logic didn't seem to suggest that None is possible.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels