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,8 +2,7 @@ from abc import (
ABC,
abstractmethod,
)
from typing import (
List,
from collections.abc import (
Sequence,
)
@ -41,7 +40,7 @@ class IAddrBook(ABC):
""" # noqa: E501
@abstractmethod
def addrs(self, peer_id: ID) -> List[Multiaddr]:
def addrs(self, peer_id: ID) -> list[Multiaddr]:
"""
:param peer_id: peer to get addresses of
:return: all known (and valid) addresses for the given peer
@ -56,7 +55,7 @@ class IAddrBook(ABC):
"""
@abstractmethod
def peers_with_addrs(self) -> List[ID]:
def peers_with_addrs(self) -> list[ID]:
"""
:return: all of the peer IDs stored with addresses
"""