mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 21:46:42 +08:00
Import from collections.abc wherever possible (#7635)
This commit is contained in:
@@ -2,7 +2,8 @@ import socket
|
||||
import sys
|
||||
import types
|
||||
from _typeshed import Self
|
||||
from typing import Any, Iterable, Union
|
||||
from collections.abc import Iterable
|
||||
from typing import Any, Union
|
||||
from typing_extensions import SupportsIndex, TypeAlias
|
||||
|
||||
__all__ = ["Client", "Listener", "Pipe", "wait"]
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import array
|
||||
import threading
|
||||
import weakref
|
||||
from collections.abc import Callable, Iterable, Mapping, Sequence
|
||||
from queue import Queue as Queue
|
||||
from typing import Any, Callable, Iterable, Mapping, Sequence
|
||||
from typing import Any
|
||||
from typing_extensions import Literal
|
||||
|
||||
from .connection import Pipe as Pipe
|
||||
|
||||
@@ -2,8 +2,9 @@ import queue
|
||||
import sys
|
||||
import threading
|
||||
from _typeshed import Self
|
||||
from collections.abc import Callable, Iterable, Mapping, Sequence
|
||||
from types import TracebackType
|
||||
from typing import Any, AnyStr, Callable, Generic, Iterable, Mapping, Sequence, TypeVar
|
||||
from typing import Any, AnyStr, Generic, TypeVar
|
||||
|
||||
from .connection import Connection
|
||||
from .context import BaseContext
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import sys
|
||||
from _typeshed import Self
|
||||
from collections.abc import Callable, Iterable, Iterator, Mapping
|
||||
from types import TracebackType
|
||||
from typing import Any, Callable, Generic, Iterable, Iterator, Mapping, TypeVar
|
||||
from typing import Any, Generic, TypeVar
|
||||
from typing_extensions import Literal
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import sys
|
||||
from _typeshed import Self
|
||||
from typing import Any, Generic, Iterable, TypeVar
|
||||
from collections.abc import Iterable
|
||||
from typing import Any, Generic, TypeVar
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
from types import GenericAlias
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
from collections.abc import Mapping, Sequence
|
||||
from types import ModuleType
|
||||
from typing import Any, Mapping, Sequence
|
||||
from typing import Any
|
||||
|
||||
__all__ = [
|
||||
"_main",
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import sys
|
||||
import threading
|
||||
from collections.abc import Callable
|
||||
from contextlib import AbstractContextManager
|
||||
from multiprocessing.context import BaseContext
|
||||
from types import TracebackType
|
||||
from typing import Any, Callable
|
||||
from typing import Any
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
__all__ = ["Lock", "RLock", "Semaphore", "BoundedSemaphore", "Condition", "Event"]
|
||||
|
||||
Reference in New Issue
Block a user