Skip to content

Commit

Permalink
Python OrderedDict to Dict
Browse files Browse the repository at this point in the history
  • Loading branch information
ooeygui committed Jan 21, 2022
1 parent c074f52 commit ba3f3f9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions assets/scripts/ros2_launch_dumper.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from typing import Text
from typing import Tuple
from typing import Union
from typing import OrderedDict

from ament_index_python.packages import get_package_prefix
from ament_index_python.packages import PackageNotFoundError
Expand All @@ -39,7 +38,7 @@

def parse_launch_arguments(launch_arguments: List[Text]) -> List[Tuple[Text, Text]]:
"""Parse the given launch arguments from the command line, into list of tuples for launch."""
parsed_launch_arguments = OrderedDict() # type: ignore
parsed_launch_arguments = {} # type: ignore; 3.7+ dict is ordered.
for argument in launch_arguments:
count = argument.count(':=')
if count == 0 or argument.startswith(':=') or (count == 1 and argument.endswith(':=')):
Expand Down

0 comments on commit ba3f3f9

Please sign in to comment.