mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
Consistently use '= ...' for optional parameters.
This commit is contained in:
@@ -20,17 +20,17 @@ class HTTPResponse(io.RawIOBase):
|
||||
chunk_left = ... # type: Any
|
||||
length = ... # type: Any
|
||||
will_close = ... # type: Any
|
||||
def __init__(self, sock, debuglevel=0, method=None, url=None) -> None: ...
|
||||
def __init__(self, sock, debuglevel=..., method=..., url=...) -> None: ...
|
||||
code = ... # type: Any
|
||||
def begin(self): ...
|
||||
def close(self): ...
|
||||
def flush(self): ...
|
||||
def readable(self): ...
|
||||
def isclosed(self): ...
|
||||
def read(self, amt=None): ...
|
||||
def read(self, amt=...): ...
|
||||
def readinto(self, b): ...
|
||||
def fileno(self): ...
|
||||
def getheader(self, name, default=None): ...
|
||||
def getheader(self, name, default=...): ...
|
||||
def getheaders(self): ...
|
||||
def __iter__(self): ...
|
||||
def info(self): ...
|
||||
@@ -46,24 +46,24 @@ class HTTPConnection:
|
||||
timeout = ... # type: Any
|
||||
source_address = ... # type: Any
|
||||
sock = ... # type: Any
|
||||
def __init__(self, host, port=None, timeout=..., source_address=None) -> None: ...
|
||||
def set_tunnel(self, host, port=None, headers=None): ...
|
||||
def __init__(self, host, port=..., timeout=..., source_address=...) -> None: ...
|
||||
def set_tunnel(self, host, port=..., headers=...): ...
|
||||
def set_debuglevel(self, level): ...
|
||||
def connect(self): ...
|
||||
def close(self): ...
|
||||
def send(self, data): ...
|
||||
def putrequest(self, method, url, skip_host=0, skip_accept_encoding=0): ...
|
||||
def putrequest(self, method, url, skip_host=..., skip_accept_encoding=...): ...
|
||||
def putheader(self, header, *values): ...
|
||||
def endheaders(self, message_body=None): ...
|
||||
def request(self, method, url, body=None, headers=...): ...
|
||||
def endheaders(self, message_body=...): ...
|
||||
def request(self, method, url, body=..., headers=...): ...
|
||||
def getresponse(self): ...
|
||||
|
||||
class HTTPSConnection(HTTPConnection):
|
||||
default_port = ... # type: Any
|
||||
key_file = ... # type: Any
|
||||
cert_file = ... # type: Any
|
||||
def __init__(self, host, port=None, key_file=None, cert_file=None, timeout=...,
|
||||
source_address=None, *, context=None, check_hostname=None): ...
|
||||
def __init__(self, host, port=..., key_file=..., cert_file=..., timeout=...,
|
||||
source_address=..., *, context=..., check_hostname=...): ...
|
||||
sock = ... # type: Any
|
||||
def connect(self): ...
|
||||
|
||||
@@ -83,7 +83,7 @@ class IncompleteRead(HTTPException):
|
||||
args = ... # type: Any
|
||||
partial = ... # type: Any
|
||||
expected = ... # type: Any
|
||||
def __init__(self, partial, expected=None) -> None: ...
|
||||
def __init__(self, partial, expected=...) -> None: ...
|
||||
|
||||
class ImproperConnectionState(HTTPException): ...
|
||||
class CannotSendRequest(ImproperConnectionState): ...
|
||||
|
||||
@@ -23,11 +23,11 @@ class Cookie:
|
||||
rfc2109 = ... # type: Any
|
||||
def __init__(self, version, name, value, port, port_specified, domain, domain_specified,
|
||||
domain_initial_dot, path, path_specified, secure, expires, discard, comment,
|
||||
comment_url, rest, rfc2109=False): ...
|
||||
comment_url, rest, rfc2109=...): ...
|
||||
def has_nonstandard_attr(self, name): ...
|
||||
def get_nonstandard_attr(self, name, default=None): ...
|
||||
def get_nonstandard_attr(self, name, default=...): ...
|
||||
def set_nonstandard_attr(self, name, value): ...
|
||||
def is_expired(self, now=None): ...
|
||||
def is_expired(self, now=...): ...
|
||||
|
||||
class CookiePolicy:
|
||||
def set_ok(self, cookie, request): ...
|
||||
@@ -51,11 +51,11 @@ class DefaultCookiePolicy(CookiePolicy):
|
||||
strict_ns_domain = ... # type: Any
|
||||
strict_ns_set_initial_dollar = ... # type: Any
|
||||
strict_ns_set_path = ... # type: Any
|
||||
def __init__(self, blocked_domains=None, allowed_domains=None, netscape=True, rfc2965=False,
|
||||
rfc2109_as_netscape=None, hide_cookie2=False, strict_domain=False,
|
||||
strict_rfc2965_unverifiable=True, strict_ns_unverifiable=False,
|
||||
strict_ns_domain=..., strict_ns_set_initial_dollar=False,
|
||||
strict_ns_set_path=False): ...
|
||||
def __init__(self, blocked_domains=..., allowed_domains=..., netscape=..., rfc2965=...,
|
||||
rfc2109_as_netscape=..., hide_cookie2=..., strict_domain=...,
|
||||
strict_rfc2965_unverifiable=..., strict_ns_unverifiable=...,
|
||||
strict_ns_domain=..., strict_ns_set_initial_dollar=...,
|
||||
strict_ns_set_path=...): ...
|
||||
def blocked_domains(self): ...
|
||||
def set_blocked_domains(self, blocked_domains): ...
|
||||
def is_blocked(self, domain): ...
|
||||
@@ -88,14 +88,14 @@ class CookieJar:
|
||||
domain_re = ... # type: Any
|
||||
dots_re = ... # type: Any
|
||||
magic_re = ... # type: Any
|
||||
def __init__(self, policy=None) -> None: ...
|
||||
def __init__(self, policy=...) -> None: ...
|
||||
def set_policy(self, policy): ...
|
||||
def add_cookie_header(self, request): ...
|
||||
def make_cookies(self, response, request): ...
|
||||
def set_cookie_if_ok(self, cookie, request): ...
|
||||
def set_cookie(self, cookie): ...
|
||||
def extract_cookies(self, response, request): ...
|
||||
def clear(self, domain=None, path=None, name=None): ...
|
||||
def clear(self, domain=..., path=..., name=...): ...
|
||||
def clear_session_cookies(self): ...
|
||||
def clear_expired_cookies(self): ...
|
||||
def __iter__(self): ...
|
||||
@@ -106,16 +106,16 @@ class LoadError(OSError): ...
|
||||
class FileCookieJar(CookieJar):
|
||||
filename = ... # type: Any
|
||||
delayload = ... # type: Any
|
||||
def __init__(self, filename=None, delayload=False, policy=None) -> None: ...
|
||||
def save(self, filename=None, ignore_discard=False, ignore_expires=False): ...
|
||||
def load(self, filename=None, ignore_discard=False, ignore_expires=False): ...
|
||||
def revert(self, filename=None, ignore_discard=False, ignore_expires=False): ...
|
||||
def __init__(self, filename=..., delayload=..., policy=...) -> None: ...
|
||||
def save(self, filename=..., ignore_discard=..., ignore_expires=...): ...
|
||||
def load(self, filename=..., ignore_discard=..., ignore_expires=...): ...
|
||||
def revert(self, filename=..., ignore_discard=..., ignore_expires=...): ...
|
||||
|
||||
class LWPCookieJar(FileCookieJar):
|
||||
def as_lwp_str(self, ignore_discard=True, ignore_expires=True): ...
|
||||
def save(self, filename=None, ignore_discard=False, ignore_expires=False): ...
|
||||
def as_lwp_str(self, ignore_discard=..., ignore_expires=...): ...
|
||||
def save(self, filename=..., ignore_discard=..., ignore_expires=...): ...
|
||||
|
||||
class MozillaCookieJar(FileCookieJar):
|
||||
magic_re = ... # type: Any
|
||||
header = ... # type: Any
|
||||
def save(self, filename=None, ignore_discard=False, ignore_expires=False): ...
|
||||
def save(self, filename=..., ignore_discard=..., ignore_expires=...): ...
|
||||
|
||||
Reference in New Issue
Block a user