Skip to content

Commit

Permalink
Fixed a few lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
abencz committed Feb 9, 2024
1 parent 1ed7832 commit e5550a1
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions ros1_bridge/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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),
Expand Down Expand Up @@ -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),
Expand Down

0 comments on commit e5550a1

Please sign in to comment.