Skip to content

Commit a4f19d7

Browse files
committed
chore: Changed formatting to conform to flake8 linting rules II
Signed-off-by: Tanner, Gilbert <[email protected]>
1 parent 9b31d75 commit a4f19d7

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

nav2_common/nav2_common/launch/parse_multirobot_pose.py

+11-13
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414

1515
from typing import Dict, Text
1616

17-
import yaml
18-
from launch.launch_context import LaunchContext
1917
import launch
18+
from launch.launch_context import LaunchContext
19+
import yaml
2020

2121

2222
class ParseMultiRobotPose(launch.Substitution):
@@ -36,27 +36,25 @@ def describe(self) -> Text:
3636
return ''
3737

3838
def perform(self, context: LaunchContext) -> Dict:
39-
"""
40-
Resolve and parse the robots argument string into a dictionary.
41-
"""
39+
"""Resolve and parse the robots argument string into a dictionary."""
4240
robots_str = self.__robots_argument.perform(context)
4341
if not robots_str:
4442
return {}
4543

4644
multirobots = {}
47-
for robot_entry in robots_str.split(";"):
48-
key_val = robot_entry.strip().split("=")
45+
for robot_entry in robots_str.split(';'):
46+
key_val = robot_entry.strip().split('=')
4947
if len(key_val) != 2:
5048
continue
5149

5250
robot_name, pose_str = key_val[0].strip(), key_val[1].strip()
5351
robot_pose = yaml.safe_load(pose_str)
5452
# Set default values if not provided
55-
robot_pose.setdefault("x", 0.0)
56-
robot_pose.setdefault("y", 0.0)
57-
robot_pose.setdefault("z", 0.0)
58-
robot_pose.setdefault("roll", 0.0)
59-
robot_pose.setdefault("pitch", 0.0)
60-
robot_pose.setdefault("yaw", 0.0)
53+
robot_pose.setdefault('x', 0.0)
54+
robot_pose.setdefault('y', 0.0)
55+
robot_pose.setdefault('z', 0.0)
56+
robot_pose.setdefault('roll', 0.0)
57+
robot_pose.setdefault('pitch', 0.0)
58+
robot_pose.setdefault('yaw', 0.0)
6159
multirobots[robot_name] = robot_pose
6260
return multirobots

0 commit comments

Comments
 (0)