Skip to content
Merged
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
5 changes: 3 additions & 2 deletions t4_devkit/dataclass/pointcloud.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
from __future__ import annotations

from t4_devkit.common.io import load_json
import struct
from abc import abstractmethod
from typing import TYPE_CHECKING, ClassVar, TypeVar

import numpy as np
from attrs import define, field

from t4_devkit.common.io import load_json

if TYPE_CHECKING:
from typing_extensions import Self

Comment thread
ktro2828 marked this conversation as resolved.
Expand Down Expand Up @@ -252,7 +253,7 @@ class RadarPointCloud(PointCloud):

# class variables
invalid_states: ClassVar[list[int]] = [0]
dynprop_states: ClassVar[list[int]] = range(7)
dynprop_states: ClassVar[list[int]] = list(range(7))
ambig_states: ClassVar[list[int]] = [3]

@staticmethod
Expand Down
23 changes: 23 additions & 0 deletions tests/dataclass/test_label.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
from __future__ import annotations

from t4_devkit.dataclass.label import SemanticLabel


def test_semantic_label() -> None:
label = SemanticLabel("car", ["vehicle.car"])
Comment thread
ktro2828 marked this conversation as resolved.

# check properties
assert label.name == "car"
assert label.attributes == ["vehicle.car"]

# same instance
assert label == label
# same label name
assert label == SemanticLabel("car")
assert label == "car"
# same label name, but different case
assert label != SemanticLabel("Car")
assert label != "Car"
# different label name
assert label != SemanticLabel("bike")
assert label != "bike"
2 changes: 1 addition & 1 deletion tests/dataclass/test_trajectory.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

import numpy as np
import pytest
from pyquaternion import Quaternion

from t4_devkit.dataclass.trajectory import Future
from t4_devkit.typing import Quaternion


def test_future_trajectory(dummy_future: Future) -> None:
Expand Down
Loading