mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 05:51:52 +08:00
Import from collections.abc wherever possible (#7635)
This commit is contained in:
@@ -4,8 +4,9 @@ import ssl
|
||||
import sys
|
||||
import types
|
||||
from _typeshed import Self, WriteableBuffer
|
||||
from collections.abc import Callable, Iterable, Iterator, Mapping
|
||||
from socket import socket
|
||||
from typing import IO, Any, BinaryIO, Callable, Iterable, Iterator, Mapping, Protocol, TypeVar, overload
|
||||
from typing import IO, Any, BinaryIO, Protocol, TypeVar, overload
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
__all__ = [
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import sys
|
||||
from _typeshed import StrPath
|
||||
from collections.abc import Iterable, Iterator, Sequence
|
||||
from http.client import HTTPResponse
|
||||
from typing import ClassVar, Iterable, Iterator, Pattern, Sequence, TypeVar, overload
|
||||
from typing import ClassVar, Pattern, TypeVar, overload
|
||||
from urllib.request import Request
|
||||
|
||||
__all__ = [
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import sys
|
||||
from typing import Any, Generic, Iterable, Mapping, TypeVar, overload
|
||||
from collections.abc import Iterable, Mapping
|
||||
from typing import Any, Generic, TypeVar, overload
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
|
||||
@@ -3,7 +3,8 @@ import io
|
||||
import socketserver
|
||||
import sys
|
||||
from _typeshed import StrPath, SupportsRead, SupportsWrite
|
||||
from typing import Any, AnyStr, BinaryIO, ClassVar, Mapping, Sequence
|
||||
from collections.abc import Mapping, Sequence
|
||||
from typing import Any, AnyStr, BinaryIO, ClassVar
|
||||
|
||||
if sys.version_info >= (3, 7):
|
||||
__all__ = ["HTTPServer", "ThreadingHTTPServer", "BaseHTTPRequestHandler", "SimpleHTTPRequestHandler", "CGIHTTPRequestHandler"]
|
||||
|
||||
Reference in New Issue
Block a user