-
Notifications
You must be signed in to change notification settings - Fork 366
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add type hints around crypto module #1714
base: master
Are you sure you want to change the base?
Conversation
@@ -88,7 +88,7 @@ def _process_received_data(self, data: bytes) -> None: | |||
return | |||
msg = self._connection.receive_from_header_and_body(header, buf) | |||
self._process_received_message(msg) | |||
if header.MessageType == ua.MessageType.SecureOpen: | |||
if header.MessageType == ua.MessageType.SecureOpen and isinstance(msg,ua.Message): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that check for isinstance cannot be correct. if that is because of mypy then annotate the "recevie_from_header_xx" over
@@ -51,7 +56,7 @@ def is_chunk_count_within_limit(self, sz: int) -> bool: | |||
_logger.error("Number of message chunks: %s is > configured max chunk count: %s", sz, self.max_chunk_count) | |||
return within_limit | |||
|
|||
def create_acknowledge_and_set_limits(self, msg: ua.Hello) -> ua.Acknowledge: | |||
def create_acknowledge_and_set_limits(self, msg: "ua.Hello") -> "ua.Acknowledge": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that too cannot be correct. should be possible to use from __future__ import annotations
stuff to avoid adding "
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there should be no reason to use " for typing
@jbeckerwsi conflicts and some comments |
No description provided.