Skip to content

Commit 4ba43e0

Browse files
committed
Fix py38 errors; add TODOs to remove when dropped
1 parent 33b5f47 commit 4ba43e0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

web3/providers/persistent/subscription_manager.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ def __init__(self, w3: "AsyncWeb3") -> None:
6262
self.task_based = False
6363
self.task_timeout = 1
6464
self.ignore_task_exceptions = False
65-
self._tasks: Set[asyncio.Task[None]] = set()
65+
# TODO: can remove quotes from type hints once Python 3.8 support is dropped
66+
self._tasks: Set["asyncio.Task[None]"] = set()
6667

6768
# share the subscription container with the request processor so it can separate
6869
# subscriptions into different queues based on ``sub._handler`` presence
@@ -95,7 +96,8 @@ def _validate_and_normalize_label(self, subscription: EthSubscription[Any]) -> N
9596
f"labels.\n label: {subscription._label}"
9697
)
9798

98-
def _handler_task_callback(self, task: asyncio.Task[None]) -> None:
99+
# TODO: can remove quotes from type hints once Python 3.8 support is dropped
100+
def _handler_task_callback(self, task: "asyncio.Task[None]") -> None:
99101
"""
100102
Callback when a handler task completes. Similar to _message_listener_callback.
101103
Puts handler exceptions into the queue to be raised in the main loop, else

0 commit comments

Comments
 (0)