From 6dcadf54de9c6d6657ed3ffd93acfd6d8a85cb9d Mon Sep 17 00:00:00 2001 From: Daijiro Fukuda Date: Tue, 22 Jul 2025 17:28:56 +0900 Subject: [PATCH] Use autopep8 as python formatter on pre-commit (#5) Closes #3 --------- Co-authored-by: Sutou Kouhei --- .pre-commit-config.yaml | 8 ++++++++ launch/display_openarm.launch.py | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 53805c3..7467ea9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -17,3 +17,11 @@ repos: rev: v0.6.13 hooks: - id: cmake-format + - repo: https://github.com/hhatto/autopep8 + rev: v2.3.2 + hooks: + - id: autopep8 + alias: python + args: + - "--ignore-local-config" + - "--in-place" diff --git a/launch/display_openarm.launch.py b/launch/display_openarm.launch.py index 18d87fc..f14e231 100644 --- a/launch/display_openarm.launch.py +++ b/launch/display_openarm.launch.py @@ -56,13 +56,13 @@ def robot_state_publisher_spawner(context: LaunchContext, arm_type, ee_type, bim def rviz_spawner(context: LaunchContext, bimanual): bimanual_str = context.perform_substitution(bimanual) - + rviz_config_file = "bimanual.rviz" if bimanual_str.lower() == "true" else "arm_only.rviz" rviz_config_path = os.path.join( get_package_share_directory("openarm_description"), "rviz", rviz_config_file ) - + return [ Node( package="rviz2",