Import from collections.abc wherever possible (#7635)

This commit is contained in:
Alex Waygood
2022-04-18 11:50:37 +01:00
committed by GitHub
parent a17b3afb16
commit 97a74bc1aa
230 changed files with 449 additions and 348 deletions

View File

@@ -2,10 +2,10 @@ import sys
import threading
from _typeshed import Self
from abc import abstractmethod
from collections.abc import Container, Iterable, Iterator, Sequence
from collections.abc import Callable, Container, Iterable, Iterator, Sequence
from logging import Logger
from types import TracebackType
from typing import Any, Callable, Generic, Protocol, TypeVar, overload
from typing import Any, Generic, Protocol, TypeVar, overload
from typing_extensions import Literal, ParamSpec, SupportsIndex
if sys.version_info >= (3, 9):

View File

@@ -1,11 +1,11 @@
import sys
from collections.abc import Generator, Iterable, Mapping, MutableMapping, MutableSequence
from collections.abc import Callable, Generator, Iterable, Mapping, MutableMapping, MutableSequence
from multiprocessing.connection import Connection
from multiprocessing.context import BaseContext, Process
from multiprocessing.queues import Queue, SimpleQueue
from threading import Lock, Semaphore, Thread
from types import TracebackType
from typing import Any, Callable, Generic, TypeVar
from typing import Any, Generic, TypeVar
from weakref import ref
from ._base import Executor, Future

View File

@@ -1,8 +1,8 @@
import queue
import sys
from collections.abc import Iterable, Mapping, Set as AbstractSet
from collections.abc import Callable, Iterable, Mapping, Set as AbstractSet
from threading import Lock, Semaphore, Thread
from typing import Any, Callable, Generic, TypeVar
from typing import Any, Generic, TypeVar
from weakref import ref
from ._base import Executor, Future