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

@ -2,13 +2,13 @@ from abc import (
ABC,
abstractmethod,
)
from collections.abc import (
AsyncIterable,
KeysView,
)
from typing import (
TYPE_CHECKING,
AsyncContextManager,
AsyncIterable,
KeysView,
List,
Tuple,
)
from libp2p.peer.id import (
@ -46,7 +46,7 @@ class ISubscriptionAPI(
class IPubsubRouter(ABC):
@abstractmethod
def get_protocols(self) -> List[TProtocol]:
def get_protocols(self) -> list[TProtocol]:
"""
:return: the list of protocols supported by the router
"""
@ -123,7 +123,7 @@ class IPubsub(ServiceAPI):
@property
@abstractmethod
def protocols(self) -> Tuple[TProtocol, ...]:
def protocols(self) -> tuple[TProtocol, ...]:
...
@property