Skip to content

Commit

Permalink
Cleanup some type annotations. (#392)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
clalancette authored Feb 14, 2024
1 parent 3546016 commit b3ab729
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion launch_ros/launch_ros/actions/load_composable_nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def __init__(
super().__init__(**kwargs)
self.__composable_node_descriptions = composable_node_descriptions
self.__target_container = target_container
self.__final_target_container_name = None # type: Optional[Text]
self.__final_target_container_name: Optional[Text] = None
self.__logger = launch.logging.get_logger(__name__)

@classmethod
Expand Down
2 changes: 1 addition & 1 deletion launch_ros/launch_ros/utilities/evaluate_parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def evaluate_parameters(context: LaunchContext, parameters: Parameters) -> Evalu
:param parameters: normalized parameters
:returns: values after evaluating lists of substitutions
"""
output_params = [] # type: List[Union[pathlib.Path, Dict[str, EvaluatedParameterValue]]]
output_params: List[Union[pathlib.Path, Dict[str, EvaluatedParameterValue]]] = []
for param in parameters:
if isinstance(param, ParameterFile):
# Evaluate a list of Substitution to a file path
Expand Down

0 comments on commit b3ab729

Please sign in to comment.