Skip to content

Commit 036a9ee

Browse files
committed
fix: type linting issues
1 parent eb93d18 commit 036a9ee

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

python/rcsss/control/fr3_desk.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,8 +303,8 @@ def take_control(self, force: bool = False) -> bool:
303303
if active.id != "" and self._token.id == "" and os.path.exists(token_path):
304304
with open(token_path, "r") as f:
305305
content = f.read()
306-
content = content.split("/n")
307-
self._token = Token(content[0], content[1], content[2])
306+
content_splitted = content.split("/n")
307+
self._token = Token(*content_splitted)
308308

309309
# we already have control
310310
if active.id != "" and self._token.id == active.id:

python/rcsss/envs/base.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,7 @@ def action(self, action: dict[str, Any]) -> dict[str, Any]:
386386
elif self.unwrapped.get_control_mode() == ControlMode.CARTESIAN_TRPY and self.trpy_key in action:
387387
assert isinstance(self._origin, common.Pose), "Invalid origin type given the control mode."
388388
assert isinstance(self.max_mov, tuple)
389+
assert isinstance(self._last_action, common.Pose)
389390
pose_space = cast(gym.spaces.Box, get_space(TRPYDictType).spaces[self.trpy_key])
390391

391392
if self.relative_to == RelativeTo.LAST_STEP or self._last_action is None:
@@ -429,6 +430,7 @@ def action(self, action: dict[str, Any]) -> dict[str, Any]:
429430
elif self.unwrapped.get_control_mode() == ControlMode.CARTESIAN_TQuart and self.tquart_key in action:
430431
assert isinstance(self._origin, common.Pose), "Invalid origin type given the control mode."
431432
assert isinstance(self.max_mov, tuple)
433+
assert isinstance(self._last_action, common.Pose)
432434
pose_space = cast(gym.spaces.Box, get_space(TQuartDictType).spaces[self.tquart_key])
433435

434436
if self.relative_to == RelativeTo.LAST_STEP or self._last_action is None:

0 commit comments

Comments
 (0)