Skip to content

Commit

Permalink
add type hints to Subscription
Browse files Browse the repository at this point in the history
  • Loading branch information
okapies committed Sep 13, 2023
1 parent daa74c2 commit 21b2e26
Show file tree
Hide file tree
Showing 4 changed files with 155 additions and 40 deletions.
4 changes: 2 additions & 2 deletions asyncua/client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from ..common.xmlexporter import XmlExporter
from ..common.node import Node
from ..common.manage_nodes import delete_nodes
from ..common.subscription import SubHandler, Subscription
from ..common.subscription import Subscription, SubscriptionHandler
from ..common.shortcuts import Shortcuts
from ..common.structures import load_type_definitions, load_enums
from ..common.structures104 import load_data_type_definitions
Expand Down Expand Up @@ -703,7 +703,7 @@ def get_node(self, nodeid: Union[Node, ua.NodeId, str, int]) -> Node:
return Node(self.uaclient, nodeid)

async def create_subscription(
self, period: Union[ua.CreateSubscriptionParameters, float], handler: SubHandler, publishing: bool = True
self, period: Union[ua.CreateSubscriptionParameters, float], handler: SubscriptionHandler, publishing: bool = True
) -> Subscription:
"""
Create a subscription.
Expand Down
Loading

0 comments on commit 21b2e26

Please sign in to comment.