mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-25 12:26:44 +08:00
@@ -1,6 +1,5 @@
|
||||
import os
|
||||
import ssl
|
||||
import sys
|
||||
from email.message import Message
|
||||
from http.client import HTTPMessage, HTTPResponse, _HTTPConnectionProtocol
|
||||
from http.cookiejar import CookieJar
|
||||
@@ -250,22 +249,12 @@ class HTTPErrorProcessor(BaseHandler):
|
||||
def http_response(self, request: Request, response: HTTPResponse) -> _UrlopenRet: ...
|
||||
def https_response(self, request: Request, response: HTTPResponse) -> _UrlopenRet: ...
|
||||
|
||||
if sys.version_info >= (3, 6):
|
||||
def urlretrieve(
|
||||
url: str,
|
||||
filename: Optional[Union[str, os.PathLike[Any]]] = ...,
|
||||
reporthook: Optional[Callable[[int, int, int], None]] = ...,
|
||||
data: Optional[bytes] = ...,
|
||||
) -> Tuple[str, HTTPMessage]: ...
|
||||
|
||||
else:
|
||||
def urlretrieve(
|
||||
url: str,
|
||||
filename: Optional[str] = ...,
|
||||
reporthook: Optional[Callable[[int, int, int], None]] = ...,
|
||||
data: Optional[bytes] = ...,
|
||||
) -> Tuple[str, HTTPMessage]: ...
|
||||
|
||||
def urlretrieve(
|
||||
url: str,
|
||||
filename: Optional[Union[str, os.PathLike[Any]]] = ...,
|
||||
reporthook: Optional[Callable[[int, int, int], None]] = ...,
|
||||
data: Optional[bytes] = ...,
|
||||
) -> Tuple[str, HTTPMessage]: ...
|
||||
def urlcleanup() -> None: ...
|
||||
|
||||
class URLopener:
|
||||
|
||||
@@ -13,8 +13,7 @@ class RobotFileParser:
|
||||
def can_fetch(self, user_agent: str, url: str) -> bool: ...
|
||||
def mtime(self) -> int: ...
|
||||
def modified(self) -> None: ...
|
||||
if sys.version_info >= (3, 6):
|
||||
def crawl_delay(self, useragent: str) -> Optional[str]: ...
|
||||
def request_rate(self, useragent: str) -> Optional[_RequestRate]: ...
|
||||
def crawl_delay(self, useragent: str) -> Optional[str]: ...
|
||||
def request_rate(self, useragent: str) -> Optional[_RequestRate]: ...
|
||||
if sys.version_info >= (3, 8):
|
||||
def site_maps(self) -> Optional[List[str]]: ...
|
||||
|
||||
Reference in New Issue
Block a user