Skip to content

Commit 77bb709

Browse files
committed
Complete argument annotation for carla classes
1 parent 5415df9 commit 77bb709

File tree

3 files changed

+78
-79
lines changed

3 files changed

+78
-79
lines changed

PythonAPI/carla/source/carla/__carla_rss.pyi

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -265,12 +265,11 @@ class RssRestrictor:
265265
266266
Returns:
267267
VehicleControl: The restricted vehicle control.
268-
269268
"""
270269
# endregion
271270

272271
# region Setters
273-
def set_log_level(self, log_level: RssLogLevel):
272+
def set_log_level(self, log_level: RssLogLevel) -> None:
274273
"""Sets the log level."""
275274
# endregion
276275

@@ -332,23 +331,23 @@ class RssSensor(Sensor):
332331
"""The current list of targets considered to route the vehicle. If no routing targets are defined, a route is generated at random."""
333332

334333
# region Methods
335-
def append_routing_target(self, routing_target: Transform):
334+
def append_routing_target(self, routing_target: Transform) -> None:
336335
"""
337336
Appends a new target position to the current route of the vehicle.
338337
339338
Args:
340339
routing_target (Transform): New target point for the route. Choose these after the intersections to force the route to take the desired turn.
341340
"""
342341

343-
def drop_route(self):
342+
def drop_route(self) -> None:
344343
"""
345344
Discards the current route.
346345
347346
If there are targets remaining in `routing_targets`, creates a new route using those.
348347
Otherwise, a new route is created at random.
349348
"""
350349

351-
def register_actor_constellation_callback(self, callback: Callable[[RssActorConstellationData], RssActorConstellationResult]):
350+
def register_actor_constellation_callback(self, callback: Callable[[RssActorConstellationData], RssActorConstellationResult]) -> None:
352351
"""
353352
Register a callback to customize a `carla.RssActorConstellationResult`.
354353
By this callback the settings of RSS parameters are done per actor constellation
@@ -358,12 +357,12 @@ class RssSensor(Sensor):
358357
callback (Callable): The function to be called whenever a RSS situation is about to be calculated.
359358
"""
360359

361-
def reset_routing_targets(self):
360+
def reset_routing_targets(self) -> None:
362361
"""Erases the targets that have been appended to the route."""
363362

364-
def set_log_level(self, log_level: RssLogLevel | int):
363+
def set_log_level(self, log_level: RssLogLevel | int) -> None:
365364
"""Sets the log level."""
366-
def set_map_log_level(self, log_level: RssLogLevel | int):
365+
def set_map_log_level(self, log_level: RssLogLevel | int) -> None:
367366
"""Sets the map log level."""
368367
# endregion
369368

PythonAPI/carla/source/carla/command.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ class SetAutopilot(_IsCommand):
383383
# endregion
384384

385385
# region Methods
386-
def __init__(self, actor: Actor | int, enabled: bool, port=8000) -> None:
386+
def __init__(self, actor: Actor | int, enabled: bool, port: int = 8000) -> None:
387387
"""Turns on/off the vehicle's autopilot mode.
388388
389389
Args:

0 commit comments

Comments
 (0)