Annotate some missing http client and urllib APIs. (#2582)

This commit is contained in:
Gregory P. Smith
2018-11-12 12:54:57 -08:00
committed by Sebastian Rittau
parent c7b0e60032
commit cd4572e43c
4 changed files with 40 additions and 7 deletions

View File

@@ -4,7 +4,7 @@ from typing import (
Any, Callable, ClassVar, Dict, List, IO, Mapping, Optional, Sequence, Tuple,
TypeVar, Union, overload, NoReturn,
)
from http.client import HTTPResponse, HTTPMessage
from http.client import HTTPResponse, HTTPMessage, HTTPConnectionProtocol
from http.cookiejar import CookieJar
from email.message import Message
from urllib.response import addinfourl
@@ -159,6 +159,9 @@ class ProxyDigestAuthHandler(BaseHandler, AbstractDigestAuthHandler):
class HTTPHandler(BaseHandler):
def http_open(self, req: Request) -> HTTPResponse: ...
def do_open(self, # undocumented
http_class: HTTPConnectionProtocol,
req: Request) -> HTTPResponse: ...
class HTTPSHandler(BaseHandler):
def __init__(self, debuglevel: int = ...,