run lint with pyupgrade at py39-plus

This commit is contained in:
pacrob
2025-01-25 15:31:51 -07:00
committed by Paul Robinson
parent 20580b9a4e
commit 8787613e91
44 changed files with 221 additions and 240 deletions

View File

@ -1,12 +1,10 @@
from collections.abc import (
AsyncIterator,
)
from contextlib import (
AsyncExitStack,
asynccontextmanager,
)
from typing import (
AsyncIterator,
Dict,
Tuple,
)
from libp2p.host.host_interface import (
IHost,
@ -45,7 +43,7 @@ class DummyAccountNode(Service):
def __init__(self, pubsub: Pubsub) -> None:
self.pubsub = pubsub
self.balances: Dict[str, int] = {}
self.balances: dict[str, int] = {}
@property
def host(self) -> IHost:
@ -58,7 +56,7 @@ class DummyAccountNode(Service):
@classmethod
@asynccontextmanager
async def create(cls, number: int) -> AsyncIterator[Tuple["DummyAccountNode", ...]]:
async def create(cls, number: int) -> AsyncIterator[tuple["DummyAccountNode", ...]]:
"""
Create a new DummyAccountNode and attach a libp2p node, a floodsub, and
a pubsub instance to this new node.