mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2025-12-31 20:36:24 +00:00
run lint with pyupgrade at py39-plus
This commit is contained in:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user