mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-09 13:02:22 +08:00
apply black and isort (#4287)
* apply black and isort * move some type ignores
This commit is contained in:
@@ -5,7 +5,9 @@ from urllib.response import addinfourl
|
||||
|
||||
class URLError(IOError):
|
||||
reason: Union[str, BaseException]
|
||||
|
||||
class HTTPError(URLError, addinfourl):
|
||||
code: int
|
||||
def __init__(self, url, code, msg, hdrs, fp) -> None: ...
|
||||
|
||||
class ContentTooShortError(URLError): ...
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
# Stubs for urllib.parse
|
||||
from typing import Any, List, Dict, Tuple, AnyStr, Generic, overload, Sequence, Mapping, Union, NamedTuple, Callable, Optional
|
||||
import sys
|
||||
from typing import Any, AnyStr, Callable, Dict, Generic, List, Mapping, NamedTuple, Optional, Sequence, Tuple, Union, overload
|
||||
|
||||
_Str = Union[bytes, str]
|
||||
|
||||
|
||||
uses_relative: List[str]
|
||||
uses_netloc: List[str]
|
||||
uses_params: List[str]
|
||||
@@ -20,11 +19,9 @@ class _ResultMixinBase(Generic[AnyStr]):
|
||||
class _ResultMixinStr(_ResultMixinBase[str]):
|
||||
def encode(self, encoding: str = ..., errors: str = ...) -> _ResultMixinBytes: ...
|
||||
|
||||
|
||||
class _ResultMixinBytes(_ResultMixinBase[str]):
|
||||
def decode(self, encoding: str = ..., errors: str = ...) -> _ResultMixinStr: ...
|
||||
|
||||
|
||||
class _NetlocResultMixinBase(Generic[AnyStr]):
|
||||
username: Optional[AnyStr]
|
||||
password: Optional[AnyStr]
|
||||
@@ -32,20 +29,19 @@ class _NetlocResultMixinBase(Generic[AnyStr]):
|
||||
port: Optional[int]
|
||||
|
||||
class _NetlocResultMixinStr(_NetlocResultMixinBase[str], _ResultMixinStr): ...
|
||||
|
||||
class _NetlocResultMixinBytes(_NetlocResultMixinBase[bytes], _ResultMixinBytes): ...
|
||||
|
||||
class _DefragResultBase(Tuple[Any, ...], Generic[AnyStr]):
|
||||
url: AnyStr
|
||||
fragment: AnyStr
|
||||
|
||||
|
||||
class _SplitResultBase(NamedTuple):
|
||||
scheme: str
|
||||
netloc: str
|
||||
path: str
|
||||
query: str
|
||||
fragment: str
|
||||
|
||||
class _SplitResultBytesBase(NamedTuple):
|
||||
scheme: bytes
|
||||
netloc: bytes
|
||||
@@ -60,6 +56,7 @@ class _ParseResultBase(NamedTuple):
|
||||
params: str
|
||||
query: str
|
||||
fragment: str
|
||||
|
||||
class _ParseResultBytesBase(NamedTuple):
|
||||
scheme: bytes
|
||||
netloc: bytes
|
||||
@@ -70,16 +67,12 @@ class _ParseResultBytesBase(NamedTuple):
|
||||
|
||||
# Structured result objects for string data
|
||||
class DefragResult(_DefragResultBase[str], _ResultMixinStr): ...
|
||||
|
||||
class SplitResult(_SplitResultBase, _NetlocResultMixinStr): ...
|
||||
|
||||
class ParseResult(_ParseResultBase, _NetlocResultMixinStr): ...
|
||||
|
||||
# Structured result objects for bytes data
|
||||
class DefragResultBytes(_DefragResultBase[bytes], _ResultMixinBytes): ...
|
||||
|
||||
class SplitResultBytes(_SplitResultBytesBase, _NetlocResultMixinBytes): ...
|
||||
|
||||
class ParseResultBytes(_ParseResultBytesBase, _NetlocResultMixinBytes): ...
|
||||
|
||||
if sys.version_info >= (3, 8):
|
||||
@@ -112,25 +105,18 @@ else:
|
||||
def quote(string: str, safe: _Str = ..., encoding: Optional[str] = ..., errors: Optional[str] = ...) -> str: ...
|
||||
@overload
|
||||
def quote(string: bytes, safe: _Str = ...) -> str: ...
|
||||
|
||||
def quote_from_bytes(bs: bytes, safe: _Str = ...) -> str: ...
|
||||
|
||||
@overload
|
||||
def quote_plus(string: str, safe: _Str = ..., encoding: Optional[str] = ..., errors: Optional[str] = ...) -> str: ...
|
||||
@overload
|
||||
def quote_plus(string: bytes, safe: _Str = ...) -> str: ...
|
||||
|
||||
def unquote(string: str, encoding: str = ..., errors: str = ...) -> str: ...
|
||||
|
||||
def unquote_to_bytes(string: _Str) -> bytes: ...
|
||||
|
||||
def unquote_plus(string: str, encoding: str = ..., errors: str = ...) -> str: ...
|
||||
|
||||
@overload
|
||||
def urldefrag(url: str) -> DefragResult: ...
|
||||
@overload
|
||||
def urldefrag(url: Optional[bytes]) -> DefragResultBytes: ...
|
||||
|
||||
def urlencode(
|
||||
query: Union[Mapping[Any, Any], Mapping[Any, Sequence[Any]], Sequence[Tuple[Any, Any]], Sequence[Tuple[Any, Sequence[Any]]]],
|
||||
doseq: bool = ...,
|
||||
@@ -139,27 +125,24 @@ def urlencode(
|
||||
errors: str = ...,
|
||||
quote_via: Callable[[str, AnyStr, str, str], str] = ...,
|
||||
) -> str: ...
|
||||
|
||||
def urljoin(base: AnyStr, url: Optional[AnyStr], allow_fragments: bool = ...) -> AnyStr: ...
|
||||
|
||||
@overload
|
||||
def urlparse(url: str, scheme: Optional[str] = ..., allow_fragments: bool = ...) -> ParseResult: ...
|
||||
@overload
|
||||
def urlparse(url: Optional[bytes], scheme: Optional[bytes] = ..., allow_fragments: bool = ...) -> ParseResultBytes: ...
|
||||
|
||||
@overload
|
||||
def urlsplit(url: str, scheme: Optional[str] = ..., allow_fragments: bool = ...) -> SplitResult: ...
|
||||
@overload
|
||||
def urlsplit(url: Optional[bytes], scheme: Optional[bytes] = ..., allow_fragments: bool = ...) -> SplitResultBytes: ...
|
||||
|
||||
@overload
|
||||
def urlunparse(
|
||||
components: Tuple[Optional[AnyStr], Optional[AnyStr], Optional[AnyStr], Optional[AnyStr], Optional[AnyStr], Optional[AnyStr]]
|
||||
) -> AnyStr: ...
|
||||
@overload
|
||||
def urlunparse(components: Sequence[Optional[AnyStr]]) -> AnyStr: ...
|
||||
|
||||
@overload
|
||||
def urlunsplit(components: Tuple[Optional[AnyStr], Optional[AnyStr], Optional[AnyStr], Optional[AnyStr], Optional[AnyStr]]) -> AnyStr: ...
|
||||
def urlunsplit(
|
||||
components: Tuple[Optional[AnyStr], Optional[AnyStr], Optional[AnyStr], Optional[AnyStr], Optional[AnyStr]]
|
||||
) -> AnyStr: ...
|
||||
@overload
|
||||
def urlunsplit(components: Sequence[Optional[AnyStr]]) -> AnyStr: ...
|
||||
|
||||
@@ -1,30 +1,29 @@
|
||||
# Stubs for urllib.request (Python 3.4)
|
||||
|
||||
from typing import (
|
||||
Any, Callable, ClassVar, Dict, List, IO, Mapping, Optional, Sequence, Tuple,
|
||||
TypeVar, Union, overload, NoReturn,
|
||||
)
|
||||
from http.client import HTTPResponse, HTTPMessage, _HTTPConnectionProtocol
|
||||
from http.cookiejar import CookieJar
|
||||
from email.message import Message
|
||||
from urllib.response import addinfourl
|
||||
import os
|
||||
import ssl
|
||||
import sys
|
||||
import os
|
||||
from email.message import Message
|
||||
from http.client import HTTPMessage, HTTPResponse, _HTTPConnectionProtocol
|
||||
from http.cookiejar import CookieJar
|
||||
from typing import IO, Any, Callable, ClassVar, Dict, List, Mapping, NoReturn, Optional, Sequence, Tuple, TypeVar, Union, overload
|
||||
from urllib.response import addinfourl
|
||||
|
||||
_T = TypeVar('_T')
|
||||
_T = TypeVar("_T")
|
||||
_UrlopenRet = Any
|
||||
|
||||
def urlopen(
|
||||
url: Union[str, Request], data: Optional[bytes] = ...,
|
||||
timeout: Optional[float] = ..., *, cafile: Optional[str] = ...,
|
||||
capath: Optional[str] = ..., cadefault: bool = ...,
|
||||
context: Optional[ssl.SSLContext] = ...
|
||||
url: Union[str, Request],
|
||||
data: Optional[bytes] = ...,
|
||||
timeout: Optional[float] = ...,
|
||||
*,
|
||||
cafile: Optional[str] = ...,
|
||||
capath: Optional[str] = ...,
|
||||
cadefault: bool = ...,
|
||||
context: Optional[ssl.SSLContext] = ...,
|
||||
) -> _UrlopenRet: ...
|
||||
def install_opener(opener: OpenerDirector) -> None: ...
|
||||
def build_opener(
|
||||
*handlers: Union[BaseHandler, Callable[[], BaseHandler]]
|
||||
) -> OpenerDirector: ...
|
||||
def build_opener(*handlers: Union[BaseHandler, Callable[[], BaseHandler]]) -> OpenerDirector: ...
|
||||
def url2pathname(pathname: str) -> str: ...
|
||||
def pathname2url(pathname: str) -> str: ...
|
||||
def getproxies() -> Dict[str, str]: ...
|
||||
@@ -47,9 +46,15 @@ class Request:
|
||||
headers: Dict[str, str]
|
||||
unverifiable: bool
|
||||
method: Optional[str]
|
||||
def __init__(self, url: str, data: Optional[bytes] = ...,
|
||||
headers: Dict[str, str] = ..., origin_req_host: Optional[str] = ...,
|
||||
unverifiable: bool = ..., method: Optional[str] = ...) -> None: ...
|
||||
def __init__(
|
||||
self,
|
||||
url: str,
|
||||
data: Optional[bytes] = ...,
|
||||
headers: Dict[str, str] = ...,
|
||||
origin_req_host: Optional[str] = ...,
|
||||
unverifiable: bool = ...,
|
||||
method: Optional[str] = ...,
|
||||
) -> None: ...
|
||||
def get_method(self) -> str: ...
|
||||
def add_header(self, key: str, val: str) -> None: ...
|
||||
def add_unredirected_header(self, key: str, val: str) -> None: ...
|
||||
@@ -66,33 +71,34 @@ class Request:
|
||||
class OpenerDirector:
|
||||
addheaders: List[Tuple[str, str]]
|
||||
def add_handler(self, handler: BaseHandler) -> None: ...
|
||||
def open(self, fullurl: Union[str, Request], data: Optional[bytes] = ...,
|
||||
timeout: Optional[float] = ...) -> _UrlopenRet: ...
|
||||
def open(self, fullurl: Union[str, Request], data: Optional[bytes] = ..., timeout: Optional[float] = ...) -> _UrlopenRet: ...
|
||||
def error(self, proto: str, *args: Any) -> _UrlopenRet: ...
|
||||
|
||||
|
||||
class BaseHandler:
|
||||
handler_order: ClassVar[int]
|
||||
parent: OpenerDirector
|
||||
def add_parent(self, parent: OpenerDirector) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
def http_error_nnn(self, req: Request, fp: IO[str], code: int, msg: int,
|
||||
headers: Mapping[str, str]) -> _UrlopenRet: ...
|
||||
def http_error_nnn(self, req: Request, fp: IO[str], code: int, msg: int, headers: Mapping[str, str]) -> _UrlopenRet: ...
|
||||
|
||||
class HTTPDefaultErrorHandler(BaseHandler): ...
|
||||
|
||||
class HTTPRedirectHandler(BaseHandler):
|
||||
def redirect_request(self, req: Request, fp: IO[str], code: int, msg: str,
|
||||
headers: Mapping[str, str],
|
||||
newurl: str) -> Optional[Request]: ...
|
||||
def http_error_301(self, req: Request, fp: IO[str], code: int, msg: int,
|
||||
headers: Mapping[str, str]) -> Optional[_UrlopenRet]: ...
|
||||
def http_error_302(self, req: Request, fp: IO[str], code: int, msg: int,
|
||||
headers: Mapping[str, str]) -> Optional[_UrlopenRet]: ...
|
||||
def http_error_303(self, req: Request, fp: IO[str], code: int, msg: int,
|
||||
headers: Mapping[str, str]) -> Optional[_UrlopenRet]: ...
|
||||
def http_error_307(self, req: Request, fp: IO[str], code: int, msg: int,
|
||||
headers: Mapping[str, str]) -> Optional[_UrlopenRet]: ...
|
||||
def redirect_request(
|
||||
self, req: Request, fp: IO[str], code: int, msg: str, headers: Mapping[str, str], newurl: str
|
||||
) -> Optional[Request]: ...
|
||||
def http_error_301(
|
||||
self, req: Request, fp: IO[str], code: int, msg: int, headers: Mapping[str, str]
|
||||
) -> Optional[_UrlopenRet]: ...
|
||||
def http_error_302(
|
||||
self, req: Request, fp: IO[str], code: int, msg: int, headers: Mapping[str, str]
|
||||
) -> Optional[_UrlopenRet]: ...
|
||||
def http_error_303(
|
||||
self, req: Request, fp: IO[str], code: int, msg: int, headers: Mapping[str, str]
|
||||
) -> Optional[_UrlopenRet]: ...
|
||||
def http_error_307(
|
||||
self, req: Request, fp: IO[str], code: int, msg: int, headers: Mapping[str, str]
|
||||
) -> Optional[_UrlopenRet]: ...
|
||||
|
||||
class HTTPCookieProcessor(BaseHandler):
|
||||
cookiejar: CookieJar
|
||||
@@ -103,46 +109,38 @@ class ProxyHandler(BaseHandler):
|
||||
# TODO add a method for every (common) proxy protocol
|
||||
|
||||
class HTTPPasswordMgr:
|
||||
def add_password(self, realm: str, uri: Union[str, Sequence[str]],
|
||||
user: str, passwd: str) -> None: ...
|
||||
def add_password(self, realm: str, uri: Union[str, Sequence[str]], user: str, passwd: str) -> None: ...
|
||||
def find_user_password(self, realm: str, authuri: str) -> Tuple[Optional[str], Optional[str]]: ...
|
||||
|
||||
class HTTPPasswordMgrWithDefaultRealm(HTTPPasswordMgr):
|
||||
def add_password(self, realm: Optional[str], uri: Union[str, Sequence[str]],
|
||||
user: str, passwd: str) -> None: ...
|
||||
def add_password(self, realm: Optional[str], uri: Union[str, Sequence[str]], user: str, passwd: str) -> None: ...
|
||||
def find_user_password(self, realm: Optional[str], authuri: str) -> Tuple[Optional[str], Optional[str]]: ...
|
||||
|
||||
class HTTPPasswordMgrWithPriorAuth(HTTPPasswordMgrWithDefaultRealm):
|
||||
def add_password(
|
||||
self,
|
||||
realm: Optional[str],
|
||||
uri: Union[str, Sequence[str]],
|
||||
user: str,
|
||||
passwd: str,
|
||||
is_authenticated: bool = ...,
|
||||
self, realm: Optional[str], uri: Union[str, Sequence[str]], user: str, passwd: str, is_authenticated: bool = ...,
|
||||
) -> None: ...
|
||||
def update_authenticated(self, uri: Union[str, Sequence[str]], is_authenticated: bool = ...) -> None: ...
|
||||
def is_authenticated(self, authuri: str) -> bool: ...
|
||||
|
||||
class AbstractBasicAuthHandler:
|
||||
def __init__(self,
|
||||
password_mgr: Optional[HTTPPasswordMgr] = ...) -> None: ...
|
||||
def http_error_auth_reqed(self, authreq: str, host: str, req: Request,
|
||||
headers: Mapping[str, str]) -> None: ...
|
||||
def __init__(self, password_mgr: Optional[HTTPPasswordMgr] = ...) -> None: ...
|
||||
def http_error_auth_reqed(self, authreq: str, host: str, req: Request, headers: Mapping[str, str]) -> None: ...
|
||||
|
||||
class HTTPBasicAuthHandler(AbstractBasicAuthHandler, BaseHandler):
|
||||
def http_error_401(self, req: Request, fp: IO[str], code: int, msg: int,
|
||||
headers: Mapping[str, str]) -> Optional[_UrlopenRet]: ...
|
||||
def http_error_401(
|
||||
self, req: Request, fp: IO[str], code: int, msg: int, headers: Mapping[str, str]
|
||||
) -> Optional[_UrlopenRet]: ...
|
||||
|
||||
class ProxyBasicAuthHandler(AbstractBasicAuthHandler, BaseHandler):
|
||||
def http_error_407(self, req: Request, fp: IO[str], code: int, msg: int,
|
||||
headers: Mapping[str, str]) -> Optional[_UrlopenRet]: ...
|
||||
def http_error_407(
|
||||
self, req: Request, fp: IO[str], code: int, msg: int, headers: Mapping[str, str]
|
||||
) -> Optional[_UrlopenRet]: ...
|
||||
|
||||
class AbstractDigestAuthHandler:
|
||||
def __init__(self, passwd: Optional[HTTPPasswordMgr] = ...) -> None: ...
|
||||
def reset_retry_count(self) -> None: ...
|
||||
def http_error_auth_reqed(self, auth_header: str, host: str, req: Request,
|
||||
headers: Mapping[str, str]) -> None: ...
|
||||
def http_error_auth_reqed(self, auth_header: str, host: str, req: Request, headers: Mapping[str, str]) -> None: ...
|
||||
def retry_http_digest_auth(self, req: Request, auth: str) -> Optional[_UrlopenRet]: ...
|
||||
def get_cnonce(self, nonce: str) -> str: ...
|
||||
def get_authorization(self, req: Request, chal: Mapping[str, str]) -> str: ...
|
||||
@@ -150,30 +148,29 @@ class AbstractDigestAuthHandler:
|
||||
def get_entity_digest(self, data: Optional[bytes], chal: Mapping[str, str]) -> Optional[str]: ...
|
||||
|
||||
class HTTPDigestAuthHandler(BaseHandler, AbstractDigestAuthHandler):
|
||||
def http_error_401(self, req: Request, fp: IO[str], code: int, msg: int,
|
||||
headers: Mapping[str, str]) -> Optional[_UrlopenRet]: ...
|
||||
def http_error_401(
|
||||
self, req: Request, fp: IO[str], code: int, msg: int, headers: Mapping[str, str]
|
||||
) -> Optional[_UrlopenRet]: ...
|
||||
|
||||
class ProxyDigestAuthHandler(BaseHandler, AbstractDigestAuthHandler):
|
||||
def http_error_407(self, req: Request, fp: IO[str], code: int, msg: int,
|
||||
headers: Mapping[str, str]) -> Optional[_UrlopenRet]: ...
|
||||
def http_error_407(
|
||||
self, req: Request, fp: IO[str], code: int, msg: int, headers: Mapping[str, str]
|
||||
) -> Optional[_UrlopenRet]: ...
|
||||
|
||||
class AbstractHTTPHandler(BaseHandler): # undocumented
|
||||
def __init__(self, debuglevel: int = ...) -> None: ...
|
||||
def set_http_debuglevel(self, level: int) -> None: ...
|
||||
def do_request_(self, request: Request) -> Request: ...
|
||||
def do_open(self,
|
||||
http_class: _HTTPConnectionProtocol,
|
||||
req: Request,
|
||||
**http_conn_args: Any) -> HTTPResponse: ...
|
||||
def do_open(self, http_class: _HTTPConnectionProtocol, req: Request, **http_conn_args: Any) -> HTTPResponse: ...
|
||||
|
||||
class HTTPHandler(AbstractHTTPHandler):
|
||||
def http_open(self, req: Request) -> HTTPResponse: ...
|
||||
def http_request(self, request: Request) -> Request: ... # undocumented
|
||||
|
||||
class HTTPSHandler(AbstractHTTPHandler):
|
||||
def __init__(self, debuglevel: int = ...,
|
||||
context: Optional[ssl.SSLContext] = ...,
|
||||
check_hostname: Optional[bool] = ...) -> None: ...
|
||||
def __init__(
|
||||
self, debuglevel: int = ..., context: Optional[ssl.SSLContext] = ..., check_hostname: Optional[bool] = ...
|
||||
) -> None: ...
|
||||
def https_open(self, req: Request) -> HTTPResponse: ...
|
||||
def https_request(self, request: Request) -> Request: ... # undocumented
|
||||
|
||||
@@ -198,25 +195,35 @@ class HTTPErrorProcessor(BaseHandler):
|
||||
def https_response(self, request, response) -> _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]: ...
|
||||
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[str] = ...,
|
||||
reporthook: Optional[Callable[[int, int, int], None]] = ...,
|
||||
data: Optional[bytes] = ...,
|
||||
) -> Tuple[str, HTTPMessage]: ...
|
||||
|
||||
def urlcleanup() -> None: ...
|
||||
|
||||
class URLopener:
|
||||
version: ClassVar[str]
|
||||
def __init__(self, proxies: Optional[Dict[str, str]] = ...,
|
||||
**x509: str) -> None: ...
|
||||
def __init__(self, proxies: Optional[Dict[str, str]] = ..., **x509: str) -> None: ...
|
||||
def open(self, fullurl: str, data: Optional[bytes] = ...) -> _UrlopenRet: ...
|
||||
def open_unknown(self, fullurl: str,
|
||||
data: Optional[bytes] = ...) -> _UrlopenRet: ...
|
||||
def retrieve(self, url: str, filename: Optional[str] = ...,
|
||||
reporthook: Optional[Callable[[int, int, int], None]] = ...,
|
||||
data: Optional[bytes] = ...) -> Tuple[str, Optional[Message]]: ...
|
||||
def open_unknown(self, fullurl: str, data: Optional[bytes] = ...) -> _UrlopenRet: ...
|
||||
def retrieve(
|
||||
self,
|
||||
url: str,
|
||||
filename: Optional[str] = ...,
|
||||
reporthook: Optional[Callable[[int, int, int], None]] = ...,
|
||||
data: Optional[bytes] = ...,
|
||||
) -> Tuple[str, Optional[Message]]: ...
|
||||
|
||||
class FancyURLopener(URLopener):
|
||||
def prompt_user_passwd(self, host: str, realm: str) -> Tuple[str, str]: ...
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# private module, we only expose what's needed
|
||||
|
||||
from typing import Any, BinaryIO, Callable, IO, Iterable, List, Mapping, Optional, Tuple, Type, TypeVar
|
||||
from email.message import Message
|
||||
from types import TracebackType
|
||||
from typing import IO, Any, BinaryIO, Callable, Iterable, List, Mapping, Optional, Tuple, Type, TypeVar
|
||||
|
||||
_AIUT = TypeVar("_AIUT", bound=addbase)
|
||||
|
||||
@@ -10,7 +10,9 @@ class addbase(BinaryIO):
|
||||
fp: IO[bytes]
|
||||
def __init__(self, fp: IO[bytes]) -> None: ...
|
||||
def __enter__(self: _AIUT) -> _AIUT: ...
|
||||
def __exit__(self, type: Optional[Type[BaseException]], value: Optional[BaseException], traceback: Optional[TracebackType]) -> None: ...
|
||||
def __exit__(
|
||||
self, type: Optional[Type[BaseException]], value: Optional[BaseException], traceback: Optional[TracebackType]
|
||||
) -> None: ...
|
||||
def __iter__(self: _AIUT) -> _AIUT: ...
|
||||
def __next__(self) -> bytes: ...
|
||||
def close(self) -> None: ...
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Stubs for urllib.robotparser (Python 3.4)
|
||||
|
||||
from typing import Iterable, List, NamedTuple, Optional
|
||||
import sys
|
||||
from typing import Iterable, List, NamedTuple, Optional
|
||||
|
||||
class _RequestRate(NamedTuple):
|
||||
requests: int
|
||||
|
||||
Reference in New Issue
Block a user