Skip to content

Commit 3449641

Browse files
committed
Extended type-stubs
1 parent 4791ae7 commit 3449641

File tree

7 files changed

+1077
-1731
lines changed

7 files changed

+1077
-1731
lines changed

PythonAPI/carla/source/carla/__carla_rss.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from typing import Callable
33

44
import ad
5-
from libcarla import (
5+
from .libcarla import (
66
Actor,
77
Sensor,
88
SensorData,

PythonAPI/carla/source/carla/ad/__init__.pyi

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,16 @@ class _IndexableVector(_Vector[_T], Protocol):
7373
class _VectorSequence(_IndexableVector[_T], Protocol):
7474
"""Adds `count` and `index` methods."""
7575

76-
def index(self, item: _T, /) -> int:
76+
def count(self, item: _T, /) -> int:
77+
...
78+
79+
@type_check_only
80+
class _SortableSequence(_VectorSequence[_T], Protocol):
81+
"""Adds `sort` method. Not all _VectorSequences support sort."""
82+
83+
# TODO: Need to check if _VectorSequence is correct base or if needs two protocols
84+
85+
def sort(self) -> None:
7786
...
7887

7988
@type_check_only
@@ -109,6 +118,9 @@ class _FloatLike(Protocol):
109118

110119
@type_check_only
111120
class _Calculable(_Assignable, _FloatLike, Protocol):
121+
"""
122+
A float like with Max, Min, and Precision values.
123+
"""
112124

113125
cMaxValue: float
114126
cMinValue: float

0 commit comments

Comments
 (0)