Skip to content

Commit

Permalink
Corrected Buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
jeguzzi committed Apr 6, 2024
1 parent 1277bce commit 9bddaaf
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions navground_py/navground/core/_navground.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ from __future__ import annotations
import numpy
import os
import typing
import typing_extensions
__all__ = ['Action', 'AheadKinematics', 'Behavior', 'BehaviorRegister', 'Buffer', 'BufferDescription', 'BufferMap', 'CachedCollisionComputation', 'CollisionComputation', 'Controller', 'Disc', 'DummyBehavior', 'EnvironmentState', 'FourWheelsOmniDriveKinematics', 'Frame', 'GeometricState', 'HLBehavior', 'HRVOBehavior', 'HasProperties', 'Kinematics', 'KinematicsRegister', 'LineSegment', 'Neighbor', 'ORCABehavior', 'OmnidirectionalKinematics', 'Pose2', 'Property', 'SensingState', 'SocialMargin', 'SocialMarginConstantModulation', 'SocialMarginLinearModulation', 'SocialMarginLogisticModulation', 'SocialMarginModulation', 'SocialMarginQuadraticModulation', 'SocialMarginZeroModulation', 'Target', 'Twist2', 'TwoWheelsDifferentialDriveKinematics', 'WheeledKinematics', 'behavior_has_geometric_state', 'dump', 'load_behavior', 'load_kinematics', 'load_plugins', 'to_absolute', 'to_relative']
class Action:
"""
Expand Down Expand Up @@ -640,7 +639,7 @@ class Buffer:
arrays.
"""
@typing.overload
def __init__(self: typing_extensions.Buffer, description: BufferDescription, value: float | float | int | int | int | int | int | int | int | int) -> None:
def __init__(self, description: BufferDescription, value: float | float | int | int | int | int | int | int | int | int) -> None:
"""
Constructs a new instance with data set to a uniform value.
Expand All @@ -651,15 +650,15 @@ class Buffer:
The value to assign to all of the buffer.
"""
@typing.overload
def __init__(self: typing_extensions.Buffer, description: BufferDescription, data: list[float] | list[float] | list[int] | list[int] | list[int] | list[int] | list[int] | list[int] | list[int] | list[int]) -> None:
def __init__(self, description: BufferDescription, data: list[float] | list[float] | list[int] | list[int] | list[int] | list[int] | list[int] | list[int] | list[int] | list[int]) -> None:
"""
Constructs a new instance, with data set to zero.
:param desc:
The description
"""
@typing.overload
def __init__(self: typing_extensions.Buffer, description: BufferDescription) -> None:
def __init__(self, description: BufferDescription) -> None:
"""
Constructs a new instance with data
Expand All @@ -670,16 +669,16 @@ class Buffer:
The data
"""
@typing.overload
def __init__(self: typing_extensions.Buffer, data: list[float] | list[float] | list[int] | list[int] | list[int] | list[int] | list[int] | list[int] | list[int] | list[int]) -> None:
def __init__(self, data: list[float] | list[float] | list[int] | list[int] | list[int] | list[int] | list[int] | list[int] | list[int] | list[int]) -> None:
"""
Constructs an unbounded, flat buffer of data
:param value:
The data
"""
def __repr__(self: typing_extensions.Buffer) -> str:
def __repr__(self) -> str:
...
def set_description(self: typing_extensions.Buffer, arg0: BufferDescription, arg1: bool) -> bool:
def set_description(self, arg0: BufferDescription, arg1: bool) -> bool:
"""
Sets the description.
Expand Down Expand Up @@ -713,7 +712,7 @@ class Buffer:
the desired type
"""
@data.setter
def data(self, arg1: typing_extensions.Buffer) -> None:
def data(self, arg1: Buffer) -> None:
...
@property
def description(self) -> BufferDescription:
Expand Down Expand Up @@ -829,15 +828,15 @@ class BufferMap:
...
def __delitem__(self, arg0: str) -> None:
...
def __getitem__(self, arg0: str) -> typing_extensions.Buffer:
def __getitem__(self, arg0: str) -> Buffer:
...
def __init__(self) -> None:
...
def __iter__(self) -> typing.Iterator[str]:
...
def __len__(self) -> int:
...
def __setitem__(self, arg0: str, arg1: typing_extensions.Buffer) -> None:
def __setitem__(self, arg0: str, arg1: Buffer) -> None:
...
def items(self) -> typing.ItemsView:
...
Expand Down Expand Up @@ -1946,7 +1945,7 @@ class SensingState(EnvironmentState):
"""
Construct an instance
"""
def get_buffer(self, key: str) -> typing_extensions.Buffer:
def get_buffer(self, key: str) -> Buffer:
"""
Gets the buffer assigned to a key
Expand All @@ -1957,7 +1956,7 @@ class SensingState(EnvironmentState):
The buffer.
"""
@typing.overload
def init_buffer(self, key: str, description: BufferDescription, value: float | float | int | int | int | int | int | int | int | int) -> typing_extensions.Buffer:
def init_buffer(self, key: str, description: BufferDescription, value: float | float | int | int | int | int | int | int | int | int) -> Buffer:
"""
Initializes a buffer with a description and a uniform value.
Expand All @@ -1974,7 +1973,7 @@ class SensingState(EnvironmentState):
The buffer if successfully initialized else a null pointer
"""
@typing.overload
def init_buffer(self, key: str, description: BufferDescription) -> typing_extensions.Buffer:
def init_buffer(self, key: str, description: BufferDescription) -> Buffer:
"""
Initializes a buffer with description, with data set to zero.
Expand All @@ -1988,7 +1987,7 @@ class SensingState(EnvironmentState):
The buffer if successfully initialized else a null pointer
"""
@typing.overload
def init_buffer(self, key: str, data: list[float] | list[float] | list[int] | list[int] | list[int] | list[int] | list[int] | list[int] | list[int] | list[int]) -> typing_extensions.Buffer:
def init_buffer(self, key: str, data: list[float] | list[float] | list[int] | list[int] | list[int] | list[int] | list[int] | list[int] | list[int] | list[int]) -> Buffer:
"""
Initializes a flat buffer with data.
Expand All @@ -2001,7 +2000,7 @@ class SensingState(EnvironmentState):
:return:
The buffer if successfully initialized else a null pointer
"""
def set_buffer(self, key: str, buffer: typing_extensions.Buffer) -> None:
def set_buffer(self, key: str, buffer: Buffer) -> None:
"""
Assign a buffer to a key.
Expand Down

0 comments on commit 9bddaaf

Please sign in to comment.