From 0cd7923d0b18954d114a7b137b41eb2aace74c6a Mon Sep 17 00:00:00 2001 From: "temkei.kem" <1041084556@qq.com> Date: Mon, 30 Sep 2024 17:21:04 +0900 Subject: [PATCH] fix pre-commit err --- .../perception_replayer/perception_replayer_common.py | 6 +++--- .../scripts/perception_replayer/utils.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/planning/planning_debug_tools/scripts/perception_replayer/perception_replayer_common.py b/planning/planning_debug_tools/scripts/perception_replayer/perception_replayer_common.py index dbdf1f14e5a20..8095724d7c681 100644 --- a/planning/planning_debug_tools/scripts/perception_replayer/perception_replayer_common.py +++ b/planning/planning_debug_tools/scripts/perception_replayer/perception_replayer_common.py @@ -128,13 +128,13 @@ def load_rosbag(self, rosbag2_path: str): msg_type = get_message(type_map[topic]) msg = deserialize_message(data, msg_type) if topic == objects_topic: - assert isinstance(msg, self.objects_pub.msg_type),f"Unsupported conversion from {type(msg)}" + assert isinstance(msg, self.objects_pub.msg_type), f"Unsupported conversion from {type(msg)}" self.rosbag_objects_data.append((stamp, msg)) if topic == ego_odom_topic: - assert isinstance(msg, Odometry),f"Unsupported conversion from {type(msg)}" + assert isinstance(msg, Odometry), f"Unsupported conversion from {type(msg)}" self.rosbag_ego_odom_data.append((stamp, msg)) if topic == traffic_signals_topic: - assert isinstance(msg, TrafficSignalArray),f"Unsupported conversion from {type(msg)}" + assert isinstance(msg, TrafficSignalArray), f"Unsupported conversion from {type(msg)}" self.rosbag_traffic_signals_data.append((stamp, msg)) def kill_online_perception_node(self): diff --git a/planning/planning_debug_tools/scripts/perception_replayer/utils.py b/planning/planning_debug_tools/scripts/perception_replayer/utils.py index 1b121f6c8efd0..c799b2c2c60bb 100644 --- a/planning/planning_debug_tools/scripts/perception_replayer/utils.py +++ b/planning/planning_debug_tools/scripts/perception_replayer/utils.py @@ -151,7 +151,7 @@ def toc(self, name): time.perf_counter() - self.start_times[name] ) * 1000 # Convert to milliseconds if self.verbose: - print(f"Time for {name}: {elapsed_time:.2f} ms") + print(f"Time for {name}: {elapsed_time: .2f} ms") # Reset the starting time for the name del self.start_times[name] \ No newline at end of file