From d3deb97d313e9207feac69d813f7fcf583ed6c9a Mon Sep 17 00:00:00 2001 From: dhood Date: Sat, 16 Jun 2018 16:58:26 -0700 Subject: [PATCH] Fix init signatures --- launch/launch/actions/execute_process.py | 2 +- launch/launch/actions/log_info.py | 4 ++-- launch/launch/actions/opaque_function.py | 2 +- launch/launch/actions/timer_action.py | 2 +- launch/launch/event_handler.py | 2 +- launch/launch/event_handlers/on_process_io.py | 2 +- launch/launch/events/process/process_targeted_event.py | 2 +- launch/launch/events/process/running_process_event.py | 2 +- launch/launch/events/process/signal_process.py | 2 +- launch/launch/events/shutdown.py | 2 +- launch/launch/launch_context.py | 2 +- launch/launch/substitutions/launch_configuration.py | 2 +- launch_ros/launch_ros/default_launch_description.py | 2 +- launch_ros/launch_ros/event_handlers/on_state_transition.py | 2 +- launch_ros/launch_ros/events/lifecycle/change_state.py | 2 +- launch_ros/launch_ros/events/lifecycle/state_transition.py | 2 +- 16 files changed, 17 insertions(+), 17 deletions(-) diff --git a/launch/launch/actions/execute_process.py b/launch/launch/actions/execute_process.py index a32d90b5a..f203dd701 100644 --- a/launch/launch/actions/execute_process.py +++ b/launch/launch/actions/execute_process.py @@ -79,7 +79,7 @@ def __init__( sigkill_timeout=LaunchConfiguration('sigkill_timeout', default=5), # type: SomeSubstitutionsType prefix=None, # type: Optional[SomeSubstitutionsType] output=None, # type: Optional[Text] - log_cmd=False, # type: bool + log_cmd=False # type: bool ) -> None: """ Construct an ExecuteProcess action. diff --git a/launch/launch/actions/log_info.py b/launch/launch/actions/log_info.py index 80c428f91..9cfda1cee 100644 --- a/launch/launch/actions/log_info.py +++ b/launch/launch/actions/log_info.py @@ -34,7 +34,7 @@ class LogInfo(Action): @overload def __init__( self, *, - msg, # type: Text + msg # type: Text ) -> None: """Construct with just Text (unicode string).""" ... @@ -42,7 +42,7 @@ def __init__( @overload # noqa: F811 def __init__( self, *, - msg, # type: List[Union[Text, Substitution]] + msg # type: List[Union[Text, Substitution]] ) -> None: """Construct with list of Text and Substitutions.""" ... diff --git a/launch/launch/actions/opaque_function.py b/launch/launch/actions/opaque_function.py index 0111ab466..bb42f2f71 100644 --- a/launch/launch/actions/opaque_function.py +++ b/launch/launch/actions/opaque_function.py @@ -49,7 +49,7 @@ def __init__( self, *, function, # type: Callable args=None, # type: Optional[Iterable[Any]] - kwargs=None, # type: Optional[Dict[Text, Any]] + kwargs=None # type: Optional[Dict[Text, Any]] ) -> None: """Constructor.""" super().__init__() diff --git a/launch/launch/actions/timer_action.py b/launch/launch/actions/timer_action.py index 404531fb2..6f7bf4f43 100644 --- a/launch/launch/actions/timer_action.py +++ b/launch/launch/actions/timer_action.py @@ -55,7 +55,7 @@ class TimerAction(Action): def __init__( self, *, period, # type: Union[float, SomeSubstitutionsType] - actions, # type: Iterable[LaunchDescriptionEntity] + actions # type: Iterable[LaunchDescriptionEntity] ) -> None: """Constructor.""" super().__init__() diff --git a/launch/launch/event_handler.py b/launch/launch/event_handler.py index 92ac6936c..55f3f4e5e 100644 --- a/launch/launch/event_handler.py +++ b/launch/launch/event_handler.py @@ -39,7 +39,7 @@ def __init__( self, *, matcher, # type: Callable[[Event], bool] - entities=None, # type: Optional[SomeActionsType] + entities=None # type: Optional[SomeActionsType] ) -> None: """ Constructor. diff --git a/launch/launch/event_handlers/on_process_io.py b/launch/launch/event_handlers/on_process_io.py index 74d03de31..208105390 100644 --- a/launch/launch/event_handlers/on_process_io.py +++ b/launch/launch/event_handlers/on_process_io.py @@ -44,7 +44,7 @@ def __init__( target_action=None, # type: Optional['ExecuteProcess'] on_stdin=None, # type: Callable[[ProcessIO], Optional[SomeActionsType]] on_stdout=None, # type: Callable[[ProcessIO], Optional[SomeActionsType]] - on_stderr=None, # type: Callable[[ProcessIO], Optional[SomeActionsType]] + on_stderr=None # type: Callable[[ProcessIO], Optional[SomeActionsType]] ) -> None: """Constructor.""" from ..actions import ExecuteProcess # noqa diff --git a/launch/launch/events/process/process_targeted_event.py b/launch/launch/events/process/process_targeted_event.py index 473dcddd4..add975cfb 100644 --- a/launch/launch/events/process/process_targeted_event.py +++ b/launch/launch/events/process/process_targeted_event.py @@ -30,7 +30,7 @@ class ProcessTargetedEvent(Event): def __init__( self, *, - process_matcher, # type: Callable[['ExecuteProcess'], bool] + process_matcher # type: Callable[['ExecuteProcess'], bool] ) -> None: """ Constructor. diff --git a/launch/launch/events/process/running_process_event.py b/launch/launch/events/process/running_process_event.py index 0a2114a3b..2ffbdcfdd 100644 --- a/launch/launch/events/process/running_process_event.py +++ b/launch/launch/events/process/running_process_event.py @@ -39,7 +39,7 @@ def __init__( cmd, # type: List[Text] cwd, # type: Optional[Text] env, # type: Optional[Dict[Text, Text]] - pid, # type: int + pid # type: int ) -> None: """ Constructor. diff --git a/launch/launch/events/process/signal_process.py b/launch/launch/events/process/signal_process.py index f37e40cae..0621ba628 100644 --- a/launch/launch/events/process/signal_process.py +++ b/launch/launch/events/process/signal_process.py @@ -34,7 +34,7 @@ class SignalProcess(ProcessTargetedEvent): def __init__( self, *, signal_number, # type: signal_module.Signals - process_matcher, # type: Callable[['ExecuteProcess'], bool + process_matcher # type: Callable[['ExecuteProcess'], bool ) -> None: """ Constructor. diff --git a/launch/launch/events/shutdown.py b/launch/launch/events/shutdown.py index c9be5798b..1741899ad 100644 --- a/launch/launch/events/shutdown.py +++ b/launch/launch/events/shutdown.py @@ -27,7 +27,7 @@ class Shutdown(Event): def __init__( self, *, reason='reason not given', # type: Text - due_to_sigint=False, # type: bool + due_to_sigint=False # type: bool ) -> None: """Constructor.""" self.__reason = reason diff --git a/launch/launch/launch_context.py b/launch/launch/launch_context.py index da6b102f3..e0c44414a 100644 --- a/launch/launch/launch_context.py +++ b/launch/launch/launch_context.py @@ -36,7 +36,7 @@ class LaunchContext: def __init__( self, *, - argv=None, # type: Optional[Iterable[Text]] + argv=None # type: Optional[Iterable[Text]] ) -> None: """ Constructor. diff --git a/launch/launch/substitutions/launch_configuration.py b/launch/launch/substitutions/launch_configuration.py index 975165854..2acb12d79 100644 --- a/launch/launch/substitutions/launch_configuration.py +++ b/launch/launch/substitutions/launch_configuration.py @@ -36,7 +36,7 @@ def __init__( self, variable_name: SomeSubstitutionsType, *, - default=None, # type: Optional[Union[Any, Iterable[Any]]] + default=None # type: Optional[Union[Any, Iterable[Any]]] ) -> None: """Constructor.""" super().__init__() diff --git a/launch_ros/launch_ros/default_launch_description.py b/launch_ros/launch_ros/default_launch_description.py index 0239c10f5..7def735da 100644 --- a/launch_ros/launch_ros/default_launch_description.py +++ b/launch_ros/launch_ros/default_launch_description.py @@ -54,7 +54,7 @@ def _on_process_output( event, # type: launch.Event *, file_name, # type: Text - prefix_output, # type: bool + prefix_output # type: bool ): typed_event = cast(launch.events.process.ProcessIO, event) text = event.text.decode() diff --git a/launch_ros/launch_ros/event_handlers/on_state_transition.py b/launch_ros/launch_ros/event_handlers/on_state_transition.py index e7dbae9a9..e4e262008 100644 --- a/launch_ros/launch_ros/event_handlers/on_state_transition.py +++ b/launch_ros/launch_ros/event_handlers/on_state_transition.py @@ -41,7 +41,7 @@ def __init__( transition=None, # type: Optional[SomeSubstitutionsType] start_state=None, # type: Optional[SomeSubstitutionsType] goal_state=None, # type: Optional[SomeSubstitutionsType] - matcher=None, # type: Optional[Callable[[Event], bool]] + matcher=None # type: Optional[Callable[[Event], bool]] ) -> None: """ Constructor. diff --git a/launch_ros/launch_ros/events/lifecycle/change_state.py b/launch_ros/launch_ros/events/lifecycle/change_state.py index 0605eb659..265e4f209 100644 --- a/launch_ros/launch_ros/events/lifecycle/change_state.py +++ b/launch_ros/launch_ros/events/lifecycle/change_state.py @@ -60,7 +60,7 @@ def __init__( self, *, lifecycle_node_matcher, # type: Callable[['LifecycleNode'], bool] - transition_id, # type: int + transition_id # type: int ) -> None: """ Constructor. diff --git a/launch_ros/launch_ros/events/lifecycle/state_transition.py b/launch_ros/launch_ros/events/lifecycle/state_transition.py index c24541183..fc827542a 100644 --- a/launch_ros/launch_ros/events/lifecycle/state_transition.py +++ b/launch_ros/launch_ros/events/lifecycle/state_transition.py @@ -34,7 +34,7 @@ def __init__( self, *, action, # type: LifecycleNode - msg, # type: lifecycle_msgs.msg.TransitionEvent + msg # type: lifecycle_msgs.msg.TransitionEvent ) -> None: """ Constructor.