mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
test: replace Callable/Iterable with their collections.abc alternative (PEP 585)
This commit is contained in:
committed by
Sebastian Falbesoner
parent
4b9afb18e6
commit
a478c817b2
@@ -10,9 +10,10 @@ import copy
|
|||||||
import ipaddress
|
import ipaddress
|
||||||
import random
|
import random
|
||||||
import unittest
|
import unittest
|
||||||
|
from collections.abc import Callable, Iterable
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
from functools import total_ordering
|
from functools import total_ordering
|
||||||
from typing import Callable, Iterable, Optional, Union, overload
|
from typing import Optional, Union, overload
|
||||||
|
|
||||||
def net_to_prefix(net: Union[ipaddress.IPv4Network,ipaddress.IPv6Network]) -> list[bool]:
|
def net_to_prefix(net: Union[ipaddress.IPv4Network,ipaddress.IPv6Network]) -> list[bool]:
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -20,7 +20,8 @@ import time
|
|||||||
|
|
||||||
from . import coverage
|
from . import coverage
|
||||||
from .authproxy import AuthServiceProxy, JSONRPCException
|
from .authproxy import AuthServiceProxy, JSONRPCException
|
||||||
from typing import Callable, Optional
|
from collections.abc import Callable
|
||||||
|
from typing import Optional
|
||||||
|
|
||||||
logger = logging.getLogger("TestFramework.utils")
|
logger = logging.getLogger("TestFramework.utils")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user