mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-16 00:37:10 +08:00
Move some protocol definitions closer to their usage sites (#8436)
This commit is contained in:
@@ -5,7 +5,7 @@ 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, Protocol, TypeVar, overload
|
||||
from typing import IO, Any, BinaryIO, TypeVar, overload
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
__all__ = [
|
||||
@@ -137,18 +137,6 @@ class HTTPResponse(io.BufferedIOBase, BinaryIO):
|
||||
def getcode(self) -> int: ...
|
||||
def begin(self) -> None: ...
|
||||
|
||||
# This is an API stub only for the class below, not a class itself.
|
||||
# urllib.request uses it for a parameter.
|
||||
class _HTTPConnectionProtocol(Protocol):
|
||||
def __call__(
|
||||
self,
|
||||
host: str,
|
||||
port: int | None = ...,
|
||||
timeout: float = ...,
|
||||
source_address: tuple[str, int] | None = ...,
|
||||
blocksize: int = ...,
|
||||
) -> HTTPConnection: ...
|
||||
|
||||
class HTTPConnection:
|
||||
auto_open: int # undocumented
|
||||
debuglevel: int
|
||||
|
||||
Reference in New Issue
Block a user