From 2db4da002d38ea6457c27054b2609c3aa325d333 Mon Sep 17 00:00:00 2001 From: Abe Zukor <abezukor@gmail.com> Date: Mon, 28 Feb 2022 21:30:05 -0600 Subject: [PATCH] Removed some type annotations to make python 3.6 compatible. --- Messages.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/Messages.py b/Messages.py index 17e1040..bdeecfe 100644 --- a/Messages.py +++ b/Messages.py @@ -1,12 +1,8 @@ - -from __future__ import annotations from dataclasses import dataclass from Transaction import Transaction from typing import TYPE_CHECKING from uuid import uuid4 -if TYPE_CHECKING: - from TransactionDeliverer import TransactionDeliverer @dataclass class Message: @@ -30,7 +26,7 @@ class TransactionMessage(Message): generate_timestamp: float deliverable: bool = False - def receive_action(self, td: TransactionDeliverer) -> bool: + def receive_action(self, td) -> bool: td.process_transaction_message(self) return True @@ -39,7 +35,7 @@ class ProposedPriorityMessage(Message): transaction_ID: str proposed_priority: int - def receive_action(self, td: TransactionDeliverer) -> bool: + def receive_action(self, td) -> bool: td.process_proposed_priority_message(self) return False @@ -50,7 +46,7 @@ class AgreedPriorityMessage(Message): agreed_priority: int proposer: str - def receive_action(self, td: TransactionDeliverer) -> bool: + def receive_action(self, td) -> bool: td.process_agreed_priority_message(self) return True -- GitLab