mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
Use PEP 688 (#10225)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
@@ -2,7 +2,7 @@ import gzip
|
||||
import http.client
|
||||
import sys
|
||||
import time
|
||||
from _typeshed import ReadableBuffer, SupportsRead, SupportsWrite, _BufferWithLen
|
||||
from _typeshed import ReadableBuffer, SizedBuffer, SupportsRead, SupportsWrite
|
||||
from collections.abc import Callable, Iterable, Mapping
|
||||
from datetime import datetime
|
||||
from io import BytesIO
|
||||
@@ -236,20 +236,20 @@ class Transport:
|
||||
def __init__(self, use_datetime: bool = False, use_builtin_types: bool = False) -> None: ...
|
||||
|
||||
def request(
|
||||
self, host: _HostType, handler: str, request_body: _BufferWithLen, verbose: bool = False
|
||||
self, host: _HostType, handler: str, request_body: SizedBuffer, verbose: bool = False
|
||||
) -> tuple[_Marshallable, ...]: ...
|
||||
def single_request(
|
||||
self, host: _HostType, handler: str, request_body: _BufferWithLen, verbose: bool = False
|
||||
self, host: _HostType, handler: str, request_body: SizedBuffer, verbose: bool = False
|
||||
) -> tuple[_Marshallable, ...]: ...
|
||||
def getparser(self) -> tuple[ExpatParser, Unmarshaller]: ...
|
||||
def get_host_info(self, host: _HostType) -> tuple[str, list[tuple[str, str]], dict[str, str]]: ...
|
||||
def make_connection(self, host: _HostType) -> http.client.HTTPConnection: ...
|
||||
def close(self) -> None: ...
|
||||
def send_request(
|
||||
self, host: _HostType, handler: str, request_body: _BufferWithLen, debug: bool
|
||||
self, host: _HostType, handler: str, request_body: SizedBuffer, debug: bool
|
||||
) -> http.client.HTTPConnection: ...
|
||||
def send_headers(self, connection: http.client.HTTPConnection, headers: list[tuple[str, str]]) -> None: ...
|
||||
def send_content(self, connection: http.client.HTTPConnection, request_body: _BufferWithLen) -> None: ...
|
||||
def send_content(self, connection: http.client.HTTPConnection, request_body: SizedBuffer) -> None: ...
|
||||
def parse_response(self, response: http.client.HTTPResponse) -> tuple[_Marshallable, ...]: ...
|
||||
|
||||
class SafeTransport(Transport):
|
||||
|
||||
Reference in New Issue
Block a user