@@ -47,7 +47,7 @@ def __init__(self, timeout: float = 1, security_policy: ua.SecurityPolicy = ua.S
4747 # needed to pass params from asynchronous request to synchronous data receive callback, as well as
4848 # passing back the processed response to the request so that it can return it.
4949 self ._open_secure_channel_exchange : Union [ua .OpenSecureChannelResponse , ua .OpenSecureChannelParameters , None ] = None
50- # Hook for upperlayer tasks before a request is send (optional)
50+ # Hook for upper layer tasks before a request is sent (optional)
5151 self .pre_request_hook : Optional [Callable [[], Awaitable [None ]]] = None
5252
5353 def connection_made (self , transport : asyncio .Transport ): # type: ignore
@@ -153,8 +153,8 @@ async def send_request(self, request, timeout: Optional[float] = None, message_t
153153 """
154154 timeout = self .timeout if timeout is None else timeout
155155 if self .pre_request_hook :
156- # This will propagade exceptions from background tasks to the libary user before calling a request which will
157- # timeout then.
156+ # This will propagate exceptions from background tasks to the library user before calling a request which will
157+ # time out then.
158158 await self .pre_request_hook ()
159159 try :
160160 data = await asyncio .wait_for (self ._send_request (request , timeout , message_type ), timeout if timeout else None )
@@ -230,7 +230,7 @@ async def open_secure_channel(self, params):
230230 async def close_secure_channel (self ):
231231 """
232232 Close secure channel.
233- It seems to trigger a shutdown of socket in most servers, so be prepare to reconnect.
233+ It seems to trigger a shutdown of socket in most servers, so be prepared to reconnect.
234234 OPC UA specs Part 6, 7.1.4 say that Server does not send a CloseSecureChannel response
235235 and should just close socket.
236236 """
@@ -310,7 +310,7 @@ async def open_secure_channel(self, params):
310310 async def close_secure_channel (self ):
311311 """
312312 close secure channel. It seems to trigger a shutdown of socket
313- in most servers, so be prepare to reconnect
313+ in most servers, so be prepared to reconnect
314314 """
315315 if not self .protocol or self .protocol .state == UASocketProtocol .CLOSED :
316316 self .logger .warning ("close_secure_channel was called but connection is closed" )
@@ -485,7 +485,7 @@ async def create_subscription(
485485 response .Parameters .SubscriptionId
486486 )
487487 if not self ._publish_task or self ._publish_task .done ():
488- # Start the publish loop if it is not yet running
488+ # Start the publishing loop if it is not yet running
489489 # The current strategy is to have only one open publish request per UaClient. This might not be enough
490490 # in high latency networks or in case many subscriptions are created. A Set of Tasks of `_publish_loop`
491491 # could be used if necessary.
@@ -494,7 +494,7 @@ async def create_subscription(
494494
495495 async def inform_subscriptions (self , status : ua .StatusCode ):
496496 """
497- Inform all current subscriptions with a status code. This calls the handlers status_change_notification
497+ Inform all current subscriptions with a status code. This calls the handler's status_change_notification
498498 """
499499 status_message = ua .StatusChangeNotification (Status = status )
500500 notification_message = ua .NotificationMessage (NotificationData = [status_message ])
@@ -570,7 +570,7 @@ async def _publish_loop(self):
570570 continue
571571 except BadNoSubscription : # See Spec. Part 5, 13.8.1
572572 # BadNoSubscription is expected to be received after deleting the last subscription.
573- # We use this as a signal to exit this task and stop sending PublishRequests. This is easier then
573+ # We use this as a signal to exit this task and stop sending PublishRequests. This is easier than
574574 # checking if there are no more subscriptions registered in this client (). A Publish response
575575 # could still arrive before the DeleteSubscription response.
576576 #
@@ -780,6 +780,6 @@ async def set_publishing_mode(self, params) -> ua.uatypes.StatusCode:
780780 return response .Parameters .Results
781781
782782 async def transfer_subscriptions (self , params : ua .TransferSubscriptionsParameters ) -> List [ua .TransferResult ]:
783- # Subscriptions aren't bound to a Session and can be transfered !
783+ # Subscriptions aren't bound to a Session and can be transferred !
784784 # https://reference.opcfoundation.org/Core/Part4/v104/5.13.7/
785785 raise NotImplementedError
0 commit comments