Skip to content

Commit

Permalink
Extended type-stubs
Browse files Browse the repository at this point in the history
  • Loading branch information
Daraan committed Oct 14, 2024
1 parent b3d9bb3 commit 3a553d5
Show file tree
Hide file tree
Showing 9 changed files with 1,083 additions and 1,734 deletions.
2 changes: 1 addition & 1 deletion PythonAPI/carla/source/carla/__carla_rss.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from typing import Callable

import ad
from libcarla import (
from .libcarla import (
Actor,
Sensor,
SensorData,
Expand Down
14 changes: 13 additions & 1 deletion PythonAPI/carla/source/carla/ad/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,16 @@ class _IndexableVector(_Vector[_T], Protocol):
class _VectorSequence(_IndexableVector[_T], Protocol):
"""Adds `count` and `index` methods."""

def index(self, item: _T, /) -> int:
def count(self, item: _T, /) -> int:
...

@type_check_only
class _SortableSequence(_VectorSequence[_T], Protocol):
"""Adds `sort` method. Not all _VectorSequences support sort."""

# TODO: Need to check if _VectorSequence is correct base or if needs two protocols

def sort(self) -> None:
...

@type_check_only
Expand Down Expand Up @@ -109,6 +118,9 @@ class _FloatLike(Protocol):

@type_check_only
class _Calculable(_Assignable, _FloatLike, Protocol):
"""
A float like with Max, Min, and Precision values.
"""

cMaxValue: float
cMinValue: float
Expand Down
Loading

0 comments on commit 3a553d5

Please sign in to comment.