From 34169831598005a2887b482061b490ecf09dd392 Mon Sep 17 00:00:00 2001 From: Andrea Date: Sun, 8 Sep 2024 19:24:48 +0200 Subject: [PATCH] fix code format . . --- .../launch/jupyter_notebook_prototyping.launch.py | 5 ++++- .../launch/motion_planning_pipeline_tutorial.launch.py | 8 ++++++-- .../launch/motion_planning_python_api_tutorial.launch.py | 1 + .../benchmarking/launch/run_benchmarks.launch.py | 4 +++- .../launch/parallel_planning_example.launch.py | 4 +++- 5 files changed, 17 insertions(+), 5 deletions(-) diff --git a/doc/examples/jupyter_notebook_prototyping/launch/jupyter_notebook_prototyping.launch.py b/doc/examples/jupyter_notebook_prototyping/launch/jupyter_notebook_prototyping.launch.py index 9ab7c386c3..5d162f8414 100644 --- a/doc/examples/jupyter_notebook_prototyping/launch/jupyter_notebook_prototyping.launch.py +++ b/doc/examples/jupyter_notebook_prototyping/launch/jupyter_notebook_prototyping.launch.py @@ -1,6 +1,7 @@ """ A launch file that starts a Jupyter notebook server and nodes that support motion planning with the MoveIt Python library. """ + import os import yaml from launch import LaunchDescription @@ -18,7 +19,9 @@ def load_yaml(package_name, file_path): try: with open(absolute_file_path, "r") as file: return yaml.safe_load(file) - except EnvironmentError: # parent of IOError, OSError *and* WindowsError where available + except ( + EnvironmentError + ): # parent of IOError, OSError *and* WindowsError where available return None diff --git a/doc/examples/motion_planning_pipeline/launch/motion_planning_pipeline_tutorial.launch.py b/doc/examples/motion_planning_pipeline/launch/motion_planning_pipeline_tutorial.launch.py index fb0555c384..f5bca3628f 100644 --- a/doc/examples/motion_planning_pipeline/launch/motion_planning_pipeline_tutorial.launch.py +++ b/doc/examples/motion_planning_pipeline/launch/motion_planning_pipeline_tutorial.launch.py @@ -13,7 +13,9 @@ def load_file(package_name, file_path): try: with open(absolute_file_path, "r") as file: return file.read() - except EnvironmentError: # parent of IOError, OSError *and* WindowsError where available + except ( + EnvironmentError + ): # parent of IOError, OSError *and* WindowsError where available return None @@ -24,7 +26,9 @@ def load_yaml(package_name, file_path): try: with open(absolute_file_path, "r") as file: return yaml.safe_load(file) - except EnvironmentError: # parent of IOError, OSError *and* WindowsError where available + except ( + EnvironmentError + ): # parent of IOError, OSError *and* WindowsError where available return None diff --git a/doc/examples/motion_planning_python_api/launch/motion_planning_python_api_tutorial.launch.py b/doc/examples/motion_planning_python_api/launch/motion_planning_python_api_tutorial.launch.py index 531c8c091b..c7b1be0dd7 100644 --- a/doc/examples/motion_planning_python_api/launch/motion_planning_python_api_tutorial.launch.py +++ b/doc/examples/motion_planning_python_api/launch/motion_planning_python_api_tutorial.launch.py @@ -1,6 +1,7 @@ """ A launch file for running the motion planning python api tutorial """ + import os from ament_index_python.packages import get_package_share_directory from launch import LaunchDescription diff --git a/doc/how_to_guides/benchmarking/launch/run_benchmarks.launch.py b/doc/how_to_guides/benchmarking/launch/run_benchmarks.launch.py index 739b51d1d9..ff7fecc583 100644 --- a/doc/how_to_guides/benchmarking/launch/run_benchmarks.launch.py +++ b/doc/how_to_guides/benchmarking/launch/run_benchmarks.launch.py @@ -14,7 +14,9 @@ def load_yaml(package_name, file_path): try: with open(absolute_file_path, "r") as file: return yaml.safe_load(file) - except EnvironmentError: # parent of IOError, OSError *and* WindowsError where available + except ( + EnvironmentError + ): # parent of IOError, OSError *and* WindowsError where available return None diff --git a/doc/how_to_guides/parallel_planning/launch/parallel_planning_example.launch.py b/doc/how_to_guides/parallel_planning/launch/parallel_planning_example.launch.py index 81ca3d77ff..65bdb9ef64 100644 --- a/doc/how_to_guides/parallel_planning/launch/parallel_planning_example.launch.py +++ b/doc/how_to_guides/parallel_planning/launch/parallel_planning_example.launch.py @@ -14,7 +14,9 @@ def load_yaml(package_name, file_path): try: with open(absolute_file_path, "r") as file: return yaml.safe_load(file) - except EnvironmentError: # parent of IOError, OSError *and* WindowsError where available + except ( + EnvironmentError + ): # parent of IOError, OSError *and* WindowsError where available return None