Removing variable annotations for python 3.5 compatibility... again.

This commit is contained in:
Piotr Lizonczyk
2017-08-14 22:53:10 +02:00
parent 384ae2539b
commit 8d807f9c6c
2 changed files with 9 additions and 9 deletions

View File

@@ -31,15 +31,15 @@ class NoiseProtocol(object):
if self.pattern_modifiers:
self.pattern.apply_pattern_modifiers(pattern_modifiers)
self.dh_fn: 'DH' = mappings['dh']
self.cipher_fn: 'Cipher' = mappings['cipher']
self.hash_fn: 'Hash' = mappings['hash']
self.dh_fn = mappings['dh']
self.cipher_fn = mappings['cipher']
self.hash_fn = mappings['hash']
self.psks: list = None # Placeholder for PSKs
self.psks = None # Placeholder for PSKs
self.handshake_state: 'HandshakeState' = Empty()
self.symmetric_state: 'SymmetricState' = Empty()
self.cipher_state: 'CipherState' = Empty()
self.handshake_state = Empty()
self.symmetric_state = Empty()
self.cipher_state = Empty()
def _parse_protocol_name(self) -> Tuple[dict, list]:
unpacked = self.name.decode().split('_')

View File

@@ -10,13 +10,13 @@ class Pattern(object):
# As per specification, if both parties have pre-messages, the initiator is listed first. To reduce complexity,
# pre_messages shall be a list of two lists:
# the first for the initiator's pre-messages, the second for the responder
pre_messages: List[list] = [
pre_messages = [
[],
[]
]
# List of lists of valid tokens, alternating between tokens for initiator and responder
tokens: List[list] = []
tokens = []
def __init__(self):
self.has_pre_messages = any(map(lambda x: len(x) > 0, self.pre_messages))