Disambiguated get_waypoint signature

Syntax fix (squased)
This commit is contained in:
Daniel 2024-04-12 16:32:37 +02:00 committed by Daraan
parent cf4b79be86
commit ab0bb04eab
1 changed files with 6 additions and 1 deletions

View File

@ -2412,6 +2412,11 @@ class Map():
"""
...
@overload
def get_waypoint(self, location: Location, project_to_road=False, lane_type=LaneType.Driving) -> Waypoint | None:
...
@overload
def get_waypoint(self, location: Location, project_to_road=True, lane_type=LaneType.Driving) -> Waypoint:
"""Returns a waypoint that can be located in an exact location or translated to the center of the nearest lane. Said lane type can be defined using flags such as `LaneType.Driving & LaneType.Shoulder`.
@ -2424,7 +2429,7 @@ class Map():
"""
...
def get_waypoint_xodr(self, road_id: int, lane_id: int, s: float) -> Waypoint:
def get_waypoint_xodr(self, road_id: int, lane_id: int, s: float) -> Waypoint | None:
"""Returns a waypoint if all the parameters passed are correct. Otherwise, returns `None`.
Args: