From e5550a13abe5a2d91ca8fd667f482138938866de Mon Sep 17 00:00:00 2001 From: Alex Bencz Date: Fri, 9 Feb 2024 11:27:25 -0500 Subject: [PATCH] Fixed a few lint errors --- ros1_bridge/__init__.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ros1_bridge/__init__.py b/ros1_bridge/__init__.py index 3fef6e64..656ebe2a 100644 --- a/ros1_bridge/__init__.py +++ b/ros1_bridge/__init__.py @@ -75,9 +75,9 @@ # matches array variables in ROS messages like: double[24] or geometry_msgs/Pose[] -array_pattern = re.compile("\[\d*\]$") +array_pattern = re.compile(r'\[\d*\]$') # matches variable length array variables in ROS messages like: geometry_msgs/Twist[] -variable_length_array_pattern = re.compile("\[\]$") +variable_length_array_pattern = re.compile(r'\[\]$') def generate_cpp(output_path, template_dir): @@ -856,7 +856,8 @@ def determine_common_services( output[direction].append({ 'basic': False if '/' in ros1_type else True, 'array': array_pattern.search(ros1_type) is not None, - 'variable_length_array': variable_length_array_pattern.search(ros1_type) is not None, + 'variable_length_array': + variable_length_array_pattern.search(ros1_type) is not None, 'ros1': { 'name': ros1_name, 'type': array_pattern.sub("", ros1_type), @@ -956,7 +957,8 @@ def determine_common_actions( output[direction].append({ 'basic': False if '/' in ros1_type else True, 'array': array_pattern.search(ros1_type) is not None, - 'variable_length_array': variable_length_array_pattern.search(ros1_type) is not None, + 'variable_length_array': + variable_length_array_pattern.search(ros1_type) is not None, 'ros1': { 'name': ros1_name, 'type': array_pattern.sub("", ros1_type),