From 59251fc184309607742074277ae8960c4cdd2e56 Mon Sep 17 00:00:00 2001 From: Michael Carlstrom Date: Fri, 23 Aug 2024 14:01:01 -0400 Subject: [PATCH] add types (#1339) Signed-off-by: Michael Carlstrom --- rclpy/rclpy/parameter_event_handler.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/rclpy/rclpy/parameter_event_handler.py b/rclpy/rclpy/parameter_event_handler.py index 9e7ea6375..033abc785 100644 --- a/rclpy/rclpy/parameter_event_handler.py +++ b/rclpy/rclpy/parameter_event_handler.py @@ -34,7 +34,7 @@ def __init__( parameter_name: str, node_name: str, callback: Callable[[Parameter], None], - ): + ) -> None: self.parameter_name = parameter_name self.node_name = node_name self.callback = callback @@ -45,7 +45,7 @@ class ParameterEventCallbackHandle: def __init__( self, callback: Callable[[ParameterEvent], None] - ): + ) -> None: self.callback = callback self.mutex = Lock() @@ -55,7 +55,7 @@ class ParameterEventHandler: class Callbacks: def __init__( self - ): + ) -> None: """ Create a Callbacks container for ParameterEventHandler. @@ -68,7 +68,7 @@ def __init__( self.event_callbacks: List[ParameterEventCallbackHandle] = [] self.mutex = Lock() - def event_callback(self, event: ParameterEvent): + def event_callback(self, event: ParameterEvent) -> None: """ Search for callback and execute it. @@ -188,7 +188,7 @@ def __init__( event_callbacks: Optional[SubscriptionEventCallbacks] = None, qos_overriding_options: Optional[QoSOverridingOptions] = None, raw: bool = False, - ): + ) -> None: """ Create ParameterEventHandler. @@ -248,7 +248,7 @@ def __init__( raw=raw, ) - def destroy(self): + def destroy(self) -> None: self.node.destroy_subscription( self.parameter_event_subscription )