Skip to content

Commit

Permalink
lint: enable ruff ANN001 rule
Browse files Browse the repository at this point in the history
  • Loading branch information
unexcellent committed Oct 29, 2024
1 parent 4b5b42f commit 63257d2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 22 deletions.
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ ignore = [
"N802",
"PERF401",
"ARG003",
"ANN001",
]

[tool.mypy]
Expand Down
18 changes: 0 additions & 18 deletions raillabel/format/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,21 +225,3 @@ def _annotations_asdict(self) -> dict:
)

return annotations_dict

def __eq__(self, other) -> bool:
"""Handel equal comparisons."""
if not hasattr(other, "__dict__"):
return False

if len(self.__dict__) != len(other.__dict__):
return False

for attr in self.__dict__:
if type(getattr(self, attr)) == type(self):
if getattr(self, attr).uid != getattr(other, attr).uid:
return False

elif getattr(self, attr) != getattr(other, attr):
return False

return True
6 changes: 3 additions & 3 deletions raillabel/format/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def _as_stream_dict(self) -> dict:
return stream_repr

@classmethod
def _extrinsics_fromdict(cls, data_dict) -> t.Optional[Transform]:
def _extrinsics_fromdict(cls, data_dict: t.Dict) -> t.Optional[Transform]:
if "pose_wrt_parent" not in data_dict:
return None

Expand All @@ -139,7 +139,7 @@ def _extrinsics_fromdict(cls, data_dict) -> t.Optional[Transform]:

@classmethod
def _intrinsics_fromdict(
cls, data_dict, sensor_type: t.Optional["SensorType"]
cls, data_dict: t.Dict, sensor_type: t.Optional["SensorType"]
) -> t.Optional[IntrinsicsPinhole]:
if "stream_properties" not in data_dict:
return None
Expand All @@ -157,7 +157,7 @@ def _intrinsics_fromdict(
return None

@classmethod
def _type_fromdict(cls, data_dict) -> t.Optional["SensorType"]:
def _type_fromdict(cls, data_dict: t.Dict) -> t.Optional["SensorType"]:
if "type" not in data_dict:
return None

Expand Down

0 comments on commit 63257d2

Please sign in to comment.