Skip to content

Commit b3ab729

Browse files
authored
Cleanup some type annotations. (ros2#392)
Certain versions of mypy complain that these annotations are not being used, since the annotations are only in comments. But we use the "inline" types everywhere else, so switch this over to the same thing, which should remove the warning. Signed-off-by: Chris Lalancette <clalancette@gmail.com>
1 parent 3546016 commit b3ab729

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

‎launch_ros/launch_ros/actions/load_composable_nodes.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def __init__(
8585
super().__init__(**kwargs)
8686
self.__composable_node_descriptions = composable_node_descriptions
8787
self.__target_container = target_container
88-
self.__final_target_container_name = None # type: Optional[Text]
88+
self.__final_target_container_name: Optional[Text] = None
8989
self.__logger = launch.logging.get_logger(__name__)
9090

9191
@classmethod

‎launch_ros/launch_ros/utilities/evaluate_parameters.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def evaluate_parameters(context: LaunchContext, parameters: Parameters) -> Evalu
157157
:param parameters: normalized parameters
158158
:returns: values after evaluating lists of substitutions
159159
"""
160-
output_params = [] # type: List[Union[pathlib.Path, Dict[str, EvaluatedParameterValue]]]
160+
output_params: List[Union[pathlib.Path, Dict[str, EvaluatedParameterValue]]] = []
161161
for param in parameters:
162162
if isinstance(param, ParameterFile):
163163
# Evaluate a list of Substitution to a file path

0 commit comments

Comments
 (0)