Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
# isort: off
# mypy: disallow-untyped-defs

from __future__ import annotations

import copy
import typing as T

Expand All @@ -26,7 +28,7 @@ def __init__(
@staticmethod
def from_all_fields(
epsilon: float,
) -> "constants_t":
) -> constants_t:
return constants_t(
epsilon=epsilon,
)
Expand All @@ -40,7 +42,7 @@ def _skytype_meta() -> T.Dict[str, str]:
)

@classmethod
def _default(cls) -> "constants_t":
def _default(cls) -> constants_t:
return cls()

def __repr__(self) -> str:
Expand All @@ -66,7 +68,7 @@ def _encode_one(self, buf: T.BinaryIO) -> None:
buf.write(constants_t._CACHED_STRUCT_0.pack(self.epsilon))

@staticmethod
def decode(data: T.Union[bytes, T.BinaryIO]) -> "constants_t":
def decode(data: T.Union[bytes, T.BinaryIO]) -> constants_t:
# NOTE(eric): This function can technically accept either a BinaryIO or
# anything that supports the C++ Buffer Protocol,
# which is unspecifiable in type hints.
Expand All @@ -82,7 +84,7 @@ def decode(data: T.Union[bytes, T.BinaryIO]) -> "constants_t":
return constants_t._decode_one(buf)

@staticmethod
def _decode_one(buf: T.BinaryIO) -> "constants_t":
def _decode_one(buf: T.BinaryIO) -> constants_t:
self = constants_t(_skip_initialize=True)
self.epsilon = constants_t._CACHED_STRUCT_0.unpack(buf.read(8))[0]
return self
Expand All @@ -102,7 +104,7 @@ def _get_packed_fingerprint() -> bytes:
constants_t._packed_fingerprint = struct.pack(">Q", constants_t._get_hash_recursive([]))
return constants_t._packed_fingerprint

def deepcopy(self, **kwargs: T.Any) -> "constants_t":
def deepcopy(self, **kwargs: T.Any) -> constants_t:
"""
Deep copy of this LCM type

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
# isort: off
# mypy: disallow-untyped-defs

from __future__ import annotations

import copy
import typing as T

Expand All @@ -27,7 +29,7 @@ def __init__(
@staticmethod
def from_all_fields(
p: Vector2d,
) -> "states_t":
) -> states_t:
return states_t(
p=p,
)
Expand All @@ -41,7 +43,7 @@ def _skytype_meta() -> T.Dict[str, str]:
)

@classmethod
def _default(cls) -> "states_t":
def _default(cls) -> states_t:
return cls()

def __repr__(self) -> str:
Expand Down Expand Up @@ -71,7 +73,7 @@ def _encode_one(self, buf: T.BinaryIO) -> None:
self.p._encode_one(buf)

@staticmethod
def decode(data: T.Union[bytes, T.BinaryIO]) -> "states_t":
def decode(data: T.Union[bytes, T.BinaryIO]) -> states_t:
# NOTE(eric): This function can technically accept either a BinaryIO or
# anything that supports the C++ Buffer Protocol,
# which is unspecifiable in type hints.
Expand All @@ -87,7 +89,7 @@ def decode(data: T.Union[bytes, T.BinaryIO]) -> "states_t":
return states_t._decode_one(buf)

@staticmethod
def _decode_one(buf: T.BinaryIO) -> "states_t":
def _decode_one(buf: T.BinaryIO) -> states_t:
self = states_t(_skip_initialize=True)
self.p = Vector2d._decode_one(buf)
return self
Expand All @@ -108,7 +110,7 @@ def _get_packed_fingerprint() -> bytes:
states_t._packed_fingerprint = struct.pack(">Q", states_t._get_hash_recursive([]))
return states_t._packed_fingerprint

def deepcopy(self, **kwargs: T.Any) -> "states_t":
def deepcopy(self, **kwargs: T.Any) -> states_t:
"""
Deep copy of this LCM type

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
# isort: off
# mypy: disallow-untyped-defs

from __future__ import annotations

import copy
import typing as T

Expand Down Expand Up @@ -42,7 +44,7 @@ def from_all_fields(
rot_vec: T.List[Vector4d],
scalar_vec: T.List[float],
list_of_lists: T.List[T.List[Vector4d]],
) -> "values_vec_t":
) -> values_vec_t:
return values_vec_t(
x=x,
y=y,
Expand All @@ -61,7 +63,7 @@ def _skytype_meta() -> T.Dict[str, str]:
)

@classmethod
def _default(cls) -> "values_vec_t":
def _default(cls) -> values_vec_t:
return cls()

def __repr__(self) -> str:
Expand Down Expand Up @@ -111,7 +113,7 @@ def _encode_one(self, buf: T.BinaryIO) -> None:
self.list_of_lists[i0][i1]._encode_one(buf)

@staticmethod
def decode(data: T.Union[bytes, T.BinaryIO]) -> "values_vec_t":
def decode(data: T.Union[bytes, T.BinaryIO]) -> values_vec_t:
# NOTE(eric): This function can technically accept either a BinaryIO or
# anything that supports the C++ Buffer Protocol,
# which is unspecifiable in type hints.
Expand All @@ -127,7 +129,7 @@ def decode(data: T.Union[bytes, T.BinaryIO]) -> "values_vec_t":
return values_vec_t._decode_one(buf)

@staticmethod
def _decode_one(buf: T.BinaryIO) -> "values_vec_t":
def _decode_one(buf: T.BinaryIO) -> values_vec_t:
self = values_vec_t(_skip_initialize=True)
self.x, self.y = values_vec_t._CACHED_STRUCT_0.unpack(buf.read(16))
self.rot = Vector4d._decode_one(buf)
Expand Down Expand Up @@ -158,7 +160,7 @@ def _get_packed_fingerprint() -> bytes:
values_vec_t._packed_fingerprint = struct.pack(">Q", values_vec_t._get_hash_recursive([]))
return values_vec_t._packed_fingerprint

def deepcopy(self, **kwargs: T.Any) -> "values_vec_t":
def deepcopy(self, **kwargs: T.Any) -> values_vec_t:
"""
Deep copy of this LCM type

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
# isort: off
# mypy: disallow-untyped-defs

from __future__ import annotations

import copy
import typing as T

Expand All @@ -27,7 +29,7 @@ def __init__(
@staticmethod
def from_all_fields(
rot: Vector4d,
) -> "my_dataclass_t":
) -> my_dataclass_t:
return my_dataclass_t(
rot=rot,
)
Expand All @@ -41,7 +43,7 @@ def _skytype_meta() -> T.Dict[str, str]:
)

@classmethod
def _default(cls) -> "my_dataclass_t":
def _default(cls) -> my_dataclass_t:
return cls()

def __repr__(self) -> str:
Expand Down Expand Up @@ -71,7 +73,7 @@ def _encode_one(self, buf: T.BinaryIO) -> None:
self.rot._encode_one(buf)

@staticmethod
def decode(data: T.Union[bytes, T.BinaryIO]) -> "my_dataclass_t":
def decode(data: T.Union[bytes, T.BinaryIO]) -> my_dataclass_t:
# NOTE(eric): This function can technically accept either a BinaryIO or
# anything that supports the C++ Buffer Protocol,
# which is unspecifiable in type hints.
Expand All @@ -87,7 +89,7 @@ def decode(data: T.Union[bytes, T.BinaryIO]) -> "my_dataclass_t":
return my_dataclass_t._decode_one(buf)

@staticmethod
def _decode_one(buf: T.BinaryIO) -> "my_dataclass_t":
def _decode_one(buf: T.BinaryIO) -> my_dataclass_t:
self = my_dataclass_t(_skip_initialize=True)
self.rot = Vector4d._decode_one(buf)
return self
Expand All @@ -108,7 +110,7 @@ def _get_packed_fingerprint() -> bytes:
my_dataclass_t._packed_fingerprint = struct.pack(">Q", my_dataclass_t._get_hash_recursive([]))
return my_dataclass_t._packed_fingerprint

def deepcopy(self, **kwargs: T.Any) -> "my_dataclass_t":
def deepcopy(self, **kwargs: T.Any) -> my_dataclass_t:
"""
Deep copy of this LCM type

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
# isort: off
# mypy: disallow-untyped-defs

from __future__ import annotations

import copy
import typing as T

Expand All @@ -26,7 +28,7 @@ def __init__(
@staticmethod
def from_all_fields(
epsilon: float,
) -> "constants_t":
) -> constants_t:
return constants_t(
epsilon=epsilon,
)
Expand All @@ -40,7 +42,7 @@ def _skytype_meta() -> T.Dict[str, str]:
)

@classmethod
def _default(cls) -> "constants_t":
def _default(cls) -> constants_t:
return cls()

def __repr__(self) -> str:
Expand All @@ -66,7 +68,7 @@ def _encode_one(self, buf: T.BinaryIO) -> None:
buf.write(constants_t._CACHED_STRUCT_0.pack(self.epsilon))

@staticmethod
def decode(data: T.Union[bytes, T.BinaryIO]) -> "constants_t":
def decode(data: T.Union[bytes, T.BinaryIO]) -> constants_t:
# NOTE(eric): This function can technically accept either a BinaryIO or
# anything that supports the C++ Buffer Protocol,
# which is unspecifiable in type hints.
Expand All @@ -82,7 +84,7 @@ def decode(data: T.Union[bytes, T.BinaryIO]) -> "constants_t":
return constants_t._decode_one(buf)

@staticmethod
def _decode_one(buf: T.BinaryIO) -> "constants_t":
def _decode_one(buf: T.BinaryIO) -> constants_t:
self = constants_t(_skip_initialize=True)
self.epsilon = constants_t._CACHED_STRUCT_0.unpack(buf.read(8))[0]
return self
Expand All @@ -102,7 +104,7 @@ def _get_packed_fingerprint() -> bytes:
constants_t._packed_fingerprint = struct.pack(">Q", constants_t._get_hash_recursive([]))
return constants_t._packed_fingerprint

def deepcopy(self, **kwargs: T.Any) -> "constants_t":
def deepcopy(self, **kwargs: T.Any) -> constants_t:
"""
Deep copy of this LCM type

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
# isort: off
# mypy: disallow-untyped-defs

from __future__ import annotations

import copy
import typing as T

Expand All @@ -27,7 +29,7 @@ def __init__(
@staticmethod
def from_all_fields(
p: Vector2d,
) -> "states_t":
) -> states_t:
return states_t(
p=p,
)
Expand All @@ -41,7 +43,7 @@ def _skytype_meta() -> T.Dict[str, str]:
)

@classmethod
def _default(cls) -> "states_t":
def _default(cls) -> states_t:
return cls()

def __repr__(self) -> str:
Expand Down Expand Up @@ -71,7 +73,7 @@ def _encode_one(self, buf: T.BinaryIO) -> None:
self.p._encode_one(buf)

@staticmethod
def decode(data: T.Union[bytes, T.BinaryIO]) -> "states_t":
def decode(data: T.Union[bytes, T.BinaryIO]) -> states_t:
# NOTE(eric): This function can technically accept either a BinaryIO or
# anything that supports the C++ Buffer Protocol,
# which is unspecifiable in type hints.
Expand All @@ -87,7 +89,7 @@ def decode(data: T.Union[bytes, T.BinaryIO]) -> "states_t":
return states_t._decode_one(buf)

@staticmethod
def _decode_one(buf: T.BinaryIO) -> "states_t":
def _decode_one(buf: T.BinaryIO) -> states_t:
self = states_t(_skip_initialize=True)
self.p = Vector2d._decode_one(buf)
return self
Expand All @@ -108,7 +110,7 @@ def _get_packed_fingerprint() -> bytes:
states_t._packed_fingerprint = struct.pack(">Q", states_t._get_hash_recursive([]))
return states_t._packed_fingerprint

def deepcopy(self, **kwargs: T.Any) -> "states_t":
def deepcopy(self, **kwargs: T.Any) -> states_t:
"""
Deep copy of this LCM type

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
# isort: off
# mypy: disallow-untyped-defs

from __future__ import annotations

import copy
import typing as T

Expand Down Expand Up @@ -42,7 +44,7 @@ def from_all_fields(
rot_vec: T.List[Vector4d],
scalar_vec: T.List[float],
list_of_lists: T.List[T.List[Vector4d]],
) -> "values_vec_t":
) -> values_vec_t:
return values_vec_t(
x=x,
y=y,
Expand All @@ -61,7 +63,7 @@ def _skytype_meta() -> T.Dict[str, str]:
)

@classmethod
def _default(cls) -> "values_vec_t":
def _default(cls) -> values_vec_t:
return cls()

def __repr__(self) -> str:
Expand Down Expand Up @@ -111,7 +113,7 @@ def _encode_one(self, buf: T.BinaryIO) -> None:
self.list_of_lists[i0][i1]._encode_one(buf)

@staticmethod
def decode(data: T.Union[bytes, T.BinaryIO]) -> "values_vec_t":
def decode(data: T.Union[bytes, T.BinaryIO]) -> values_vec_t:
# NOTE(eric): This function can technically accept either a BinaryIO or
# anything that supports the C++ Buffer Protocol,
# which is unspecifiable in type hints.
Expand All @@ -127,7 +129,7 @@ def decode(data: T.Union[bytes, T.BinaryIO]) -> "values_vec_t":
return values_vec_t._decode_one(buf)

@staticmethod
def _decode_one(buf: T.BinaryIO) -> "values_vec_t":
def _decode_one(buf: T.BinaryIO) -> values_vec_t:
self = values_vec_t(_skip_initialize=True)
self.x, self.y = values_vec_t._CACHED_STRUCT_0.unpack(buf.read(16))
self.rot = Vector4d._decode_one(buf)
Expand Down Expand Up @@ -158,7 +160,7 @@ def _get_packed_fingerprint() -> bytes:
values_vec_t._packed_fingerprint = struct.pack(">Q", values_vec_t._get_hash_recursive([]))
return values_vec_t._packed_fingerprint

def deepcopy(self, **kwargs: T.Any) -> "values_vec_t":
def deepcopy(self, **kwargs: T.Any) -> values_vec_t:
"""
Deep copy of this LCM type

Expand Down
Loading
Loading