From ae499216e569ff816684b0137ef31e6ca5f0d649 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 21 Nov 2024 19:55:16 +0000 Subject: [PATCH] style(pre-commit): autofix --- .../autoware_lanelet2_divider/autoware_lanelet2_divider.py | 6 ++++-- .../autoware_lanelet2_divider/xml_tool/xml_tool.py | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/map/autoware_lanelet2_divider/autoware_lanelet2_divider/autoware_lanelet2_divider.py b/map/autoware_lanelet2_divider/autoware_lanelet2_divider/autoware_lanelet2_divider.py index a0228b1a..f713bfe8 100644 --- a/map/autoware_lanelet2_divider/autoware_lanelet2_divider/autoware_lanelet2_divider.py +++ b/map/autoware_lanelet2_divider/autoware_lanelet2_divider/autoware_lanelet2_divider.py @@ -36,7 +36,9 @@ def __init__(self): Debug.log("Grid Edge Size: %d" % self.grid_edge_size, DebugMessageType.INFO) # Create copy of osm file - shutil.copy(self.input_lanelet2_map_path, self.input_lanelet2_map_path.replace(".osm", "_temp.osm")) + shutil.copy( + self.input_lanelet2_map_path, self.input_lanelet2_map_path.replace(".osm", "_temp.osm") + ) self.input_lanelet2_map_path = self.input_lanelet2_map_path.replace(".osm", "_temp.osm") # Complete if missing "version" element in lanelet2_map.osm @@ -64,7 +66,7 @@ def __init__(self): xml_tool.complete_missing_elements( self.input_lanelet2_map_path, os.path.join(self.output_folder_path, "lanelet2_map.osm") ) - + # Remove temp osm file os.remove(self.input_lanelet2_map_path) diff --git a/map/autoware_lanelet2_divider/autoware_lanelet2_divider/xml_tool/xml_tool.py b/map/autoware_lanelet2_divider/autoware_lanelet2_divider/xml_tool/xml_tool.py index b80d1d7b..cb469e32 100644 --- a/map/autoware_lanelet2_divider/autoware_lanelet2_divider/xml_tool/xml_tool.py +++ b/map/autoware_lanelet2_divider/autoware_lanelet2_divider/xml_tool/xml_tool.py @@ -149,7 +149,7 @@ def complete_missing_version_tag(input_osm_file_path: str): if root_element != "version": add_version = True break - + if add_version: element.set("version", "1")