Skip to content

Commit

Permalink
Autoupdate pre-commit hooks
Browse files Browse the repository at this point in the history
Signed-off-by: Andrej Orsula <orsula.andrej@gmail.com>
  • Loading branch information
AndrejOrsula committed May 10, 2024
1 parent 2f4b35f commit 2e4fddd
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 37 deletions.
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.6.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
Expand All @@ -22,13 +22,13 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/pycqa/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort
args: ["--profile", "black"]

- repo: https://github.com/psf/black
rev: 23.1.0
rev: 24.4.2
hooks:
- id: black

Expand All @@ -38,11 +38,11 @@ repos:
- id: beautysh

- repo: https://github.com/executablebooks/mdformat
rev: 0.7.16
rev: 0.7.17
hooks:
- id: mdformat

- repo: https://github.com/codespell-project/codespell
rev: v2.2.4
rev: v2.2.6
hooks:
- id: codespell
66 changes: 34 additions & 32 deletions pymoveit2/moveit2.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,9 +360,9 @@ def move_to_pose(
pose_stamped = PoseStamped(
header=Header(
stamp=self._node.get_clock().now().to_msg(),
frame_id=frame_id
if frame_id is not None
else self.__base_link_name,
frame_id=(
frame_id if frame_id is not None else self.__base_link_name
),
),
pose=pose,
)
Expand All @@ -381,9 +381,9 @@ def move_to_pose(
pose_stamped = PoseStamped(
header=Header(
stamp=self._node.get_clock().now().to_msg(),
frame_id=frame_id
if frame_id is not None
else self.__base_link_name,
frame_id=(
frame_id if frame_id is not None else self.__base_link_name
),
),
pose=Pose(position=position, orientation=quat_xyzw),
)
Expand Down Expand Up @@ -571,9 +571,9 @@ def plan_async(
pose_stamped = PoseStamped(
header=Header(
stamp=self._node.get_clock().now().to_msg(),
frame_id=frame_id
if frame_id is not None
else self.__base_link_name,
frame_id=(
frame_id if frame_id is not None else self.__base_link_name
),
),
pose=pose,
)
Expand Down Expand Up @@ -652,9 +652,11 @@ def plan_async(
if cartesian:
future = self._plan_cartesian_path(
max_step=max_step,
frame_id=pose_stamped.header.frame_id
if pose_stamped is not None
else frame_id,
frame_id=(
pose_stamped.header.frame_id
if pose_stamped is not None
else frame_id
),
)
else:
# Use service
Expand Down Expand Up @@ -807,9 +809,9 @@ def set_pose_goal(
pose_stamped = PoseStamped(
header=Header(
stamp=self._node.get_clock().now().to_msg(),
frame_id=frame_id
if frame_id is not None
else self.__base_link_name,
frame_id=(
frame_id if frame_id is not None else self.__base_link_name
),
),
pose=pose,
)
Expand All @@ -828,9 +830,9 @@ def set_pose_goal(
pose_stamped = PoseStamped(
header=Header(
stamp=self._node.get_clock().now().to_msg(),
frame_id=frame_id
if frame_id is not None
else self.__base_link_name,
frame_id=(
frame_id if frame_id is not None else self.__base_link_name
),
),
pose=Pose(position=position, orientation=quat_xyzw),
)
Expand Down Expand Up @@ -1451,9 +1453,9 @@ def add_collision_primitive(
pose_stamped = PoseStamped(
header=Header(
stamp=self._node.get_clock().now().to_msg(),
frame_id=frame_id
if frame_id is not None
else self.__base_link_name,
frame_id=(
frame_id if frame_id is not None else self.__base_link_name
),
),
pose=pose,
)
Expand All @@ -1472,9 +1474,9 @@ def add_collision_primitive(
pose_stamped = PoseStamped(
header=Header(
stamp=self._node.get_clock().now().to_msg(),
frame_id=frame_id
if frame_id is not None
else self.__base_link_name,
frame_id=(
frame_id if frame_id is not None else self.__base_link_name
),
),
pose=Pose(position=position, orientation=quat_xyzw),
)
Expand Down Expand Up @@ -1656,9 +1658,9 @@ def add_collision_mesh(
pose_stamped = PoseStamped(
header=Header(
stamp=self._node.get_clock().now().to_msg(),
frame_id=frame_id
if frame_id is not None
else self.__base_link_name,
frame_id=(
frame_id if frame_id is not None else self.__base_link_name
),
),
pose=pose,
)
Expand All @@ -1677,9 +1679,9 @@ def add_collision_mesh(
pose_stamped = PoseStamped(
header=Header(
stamp=self._node.get_clock().now().to_msg(),
frame_id=frame_id
if frame_id is not None
else self.__base_link_name,
frame_id=(
frame_id if frame_id is not None else self.__base_link_name
),
),
pose=Pose(position=position, orientation=quat_xyzw),
)
Expand Down Expand Up @@ -1908,7 +1910,7 @@ def __joint_state_callback(self, msg: JointState):
self.__joint_state_mutex.release()

def _plan_kinematic_path(self) -> Optional[Future]:
# Re-use request from move action goal
# Reuse request from move action goal
self.__kinematic_path_request.motion_plan_request = (
self.__move_action_goal.request
)
Expand Down Expand Up @@ -1940,7 +1942,7 @@ def _plan_cartesian_path(
max_step: float = 0.0025,
frame_id: Optional[str] = None,
) -> Optional[Future]:
# Re-use request from move action goal
# Reuse request from move action goal
self.__cartesian_path_request.start_state = (
self.__move_action_goal.request.start_state
)
Expand Down

0 comments on commit 2e4fddd

Please sign in to comment.