mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-02-12 16:10:57 +00:00
run lint with pyupgrade at py39-plus
This commit is contained in:
@ -1,10 +1,10 @@
|
||||
from collections.abc import (
|
||||
Awaitable,
|
||||
Sequence,
|
||||
)
|
||||
import logging
|
||||
from typing import (
|
||||
Awaitable,
|
||||
Callable,
|
||||
List,
|
||||
Sequence,
|
||||
Tuple,
|
||||
)
|
||||
|
||||
from multiaddr import (
|
||||
@ -41,7 +41,7 @@ logger = logging.getLogger("libp2p.transport.tcp")
|
||||
|
||||
|
||||
class TCPListener(IListener):
|
||||
listeners: List[trio.SocketListener]
|
||||
listeners: list[trio.SocketListener]
|
||||
|
||||
def __init__(self, handler_function: THandler) -> None:
|
||||
self.listeners = []
|
||||
@ -78,7 +78,7 @@ class TCPListener(IListener):
|
||||
)
|
||||
self.listeners.extend(listeners)
|
||||
|
||||
def get_addrs(self) -> Tuple[Multiaddr, ...]:
|
||||
def get_addrs(self) -> tuple[Multiaddr, ...]:
|
||||
"""
|
||||
Retrieve list of addresses the listener is listening on.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user