Skip to content

Commit

Permalink
add types (#1339)
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Carlstrom <[email protected]>
  • Loading branch information
InvincibleRMC authored Aug 23, 2024
1 parent f338416 commit 59251fc
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions rclpy/rclpy/parameter_event_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -45,7 +45,7 @@ class ParameterEventCallbackHandle:
def __init__(
self,
callback: Callable[[ParameterEvent], None]
):
) -> None:
self.callback = callback
self.mutex = Lock()

Expand All @@ -55,7 +55,7 @@ class ParameterEventHandler:
class Callbacks:
def __init__(
self
):
) -> None:
"""
Create a Callbacks container for ParameterEventHandler.
Expand All @@ -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.
Expand Down Expand Up @@ -188,7 +188,7 @@ def __init__(
event_callbacks: Optional[SubscriptionEventCallbacks] = None,
qos_overriding_options: Optional[QoSOverridingOptions] = None,
raw: bool = False,
):
) -> None:
"""
Create ParameterEventHandler.
Expand Down Expand Up @@ -248,7 +248,7 @@ def __init__(
raw=raw,
)

def destroy(self):
def destroy(self) -> None:
self.node.destroy_subscription(
self.parameter_event_subscription
)
Expand Down

0 comments on commit 59251fc

Please sign in to comment.