diff --git a/stdlib/2/Cookie.pyi b/stdlib/2/Cookie.pyi index a4e634404..234c0d006 100644 --- a/stdlib/2/Cookie.pyi +++ b/stdlib/2/Cookie.pyi @@ -1,4 +1,4 @@ -from typing import Any +from typing import Any, Optional class CookieError(Exception): ... @@ -10,17 +10,17 @@ class Morsel(dict): value = ... # type: Any coded_value = ... # type: Any def set(self, key, val, coded_val, LegalChars=..., idmap=..., translate=...): ... - def output(self, attrs=None, header=...): ... - def js_output(self, attrs=None): ... - def OutputString(self, attrs=None): ... + def output(self, attrs: Optional[Any] = ..., header=...): ... + def js_output(self, attrs: Optional[Any] = ...): ... + def OutputString(self, attrs: Optional[Any] = ...): ... class BaseCookie(dict): def value_decode(self, val): ... def value_encode(self, val): ... - def __init__(self, input=None): ... + def __init__(self, input: Optional[Any] = ...): ... def __setitem__(self, key, value): ... - def output(self, attrs=None, header=..., sep=...): ... - def js_output(self, attrs=None): ... + def output(self, attrs: Optional[Any] = ..., header=..., sep=...): ... + def js_output(self, attrs: Optional[Any] = ...): ... def load(self, rawdata): ... class SimpleCookie(BaseCookie): @@ -28,12 +28,12 @@ class SimpleCookie(BaseCookie): def value_encode(self, val): ... class SerialCookie(BaseCookie): - def __init__(self, input=None): ... + def __init__(self, input: Optional[Any] = ...): ... def value_decode(self, val): ... def value_encode(self, val): ... class SmartCookie(BaseCookie): - def __init__(self, input=None): ... + def __init__(self, input: Optional[Any] = ...): ... def value_decode(self, val): ... def value_encode(self, val): ... diff --git a/stdlib/2/cookielib.pyi b/stdlib/2/cookielib.pyi index e17f17ad9..cc3bbadf3 100644 --- a/stdlib/2/cookielib.pyi +++ b/stdlib/2/cookielib.pyi @@ -1,4 +1,4 @@ -from typing import Any +from typing import Any, Optional class Cookie: version = ... # type: Any @@ -17,11 +17,12 @@ class Cookie: comment = ... # type: Any comment_url = ... # type: Any 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): ... + 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: bool = ...): ... def has_nonstandard_attr(self, name): ... - def get_nonstandard_attr(self, name, default=None): ... + def get_nonstandard_attr(self, name, default: Optional[Any] = ...): ... def set_nonstandard_attr(self, name, value): ... - def is_expired(self, now=None): ... + def is_expired(self, now: Optional[Any] = ...): ... class CookiePolicy: def set_ok(self, cookie, request): ... @@ -45,7 +46,10 @@ 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: Optional[Any] = ..., allowed_domains: Optional[Any] = ..., netscape: bool = ..., + rfc2965: bool = ..., rfc2109_as_netscape: Optional[Any] = ..., hide_cookie2: bool = ..., + strict_domain: bool = ..., strict_rfc2965_unverifiable: bool = ..., strict_ns_unverifiable: bool = ..., + strict_ns_domain=..., strict_ns_set_initial_dollar: bool = ..., strict_ns_set_path: bool = ...): ... def blocked_domains(self): ... def set_blocked_domains(self, blocked_domains): ... def is_blocked(self, domain): ... @@ -78,14 +82,14 @@ class CookieJar: domain_re = ... # type: Any dots_re = ... # type: Any magic_re = ... # type: Any - def __init__(self, policy=None): ... + def __init__(self, policy: Optional[Any] = ...): ... 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: Optional[Any] = ..., path: Optional[Any] = ..., name: Optional[Any] = ...): ... def clear_session_cookies(self): ... def clear_expired_cookies(self): ... def __iter__(self): ... @@ -96,10 +100,10 @@ class LoadError(IOError): ... class FileCookieJar(CookieJar): filename = ... # type: Any delayload = ... # type: Any - def __init__(self, filename=None, delayload=False, policy=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: Optional[Any] = ..., delayload: bool = ..., policy: Optional[Any] = ...): ... + def save(self, filename: Optional[Any] = ..., ignore_discard: bool = ..., ignore_expires: bool = ...): ... + def load(self, filename: Optional[Any] = ..., ignore_discard: bool = ..., ignore_expires: bool = ...): ... + def revert(self, filename: Optional[Any] = ..., ignore_discard: bool = ..., ignore_expires: bool = ...): ... MozillaCookieJar = FileCookieJar LWPCookieJar = FileCookieJar diff --git a/stdlib/2/email/_parseaddr.pyi b/stdlib/2/email/_parseaddr.pyi index beba33f19..2cc529a96 100644 --- a/stdlib/2/email/_parseaddr.pyi +++ b/stdlib/2/email/_parseaddr.pyi @@ -1,4 +1,4 @@ -from typing import Any +from typing import Any, Optional def parsedate_tz(data): ... def parsedate(data): ... @@ -22,11 +22,11 @@ class AddrlistClass: def getrouteaddr(self): ... def getaddrspec(self): ... def getdomain(self): ... - def getdelimited(self, beginchar, endchars, allowcomments=True): ... + def getdelimited(self, beginchar, endchars, allowcomments: bool = ...): ... def getquote(self): ... def getcomment(self): ... def getdomainliteral(self): ... - def getatom(self, atomends=None): ... + def getatom(self, atomends: Optional[Any] = ...): ... def getphraselist(self): ... class AddressList(AddrlistClass): diff --git a/stdlib/2/email/utils.pyi b/stdlib/2/email/utils.pyi index 293a4c3e4..7b868efce 100644 --- a/stdlib/2/email/utils.pyi +++ b/stdlib/2/email/utils.pyi @@ -3,16 +3,17 @@ from email._parseaddr import mktime_tz as mktime_tz from email._parseaddr import parsedate as _parsedate from email._parseaddr import parsedate_tz as _parsedate_tz from quopri import decodestring as _qdecode +from typing import Optional, Any def formataddr(pair): ... def getaddresses(fieldvalues): ... -def formatdate(timeval=None, localtime=False, usegmt=False): ... -def make_msgid(idstring=None): ... +def formatdate(timeval: Optional[Any] = ..., localtime: bool = ..., usegmt: bool = ...): ... +def make_msgid(idstring: Optional[Any] = ...): ... def parsedate(data): ... def parsedate_tz(data): ... def parseaddr(addr): ... def unquote(str): ... def decode_rfc2231(s): ... -def encode_rfc2231(s, charset=None, language=None): ... +def encode_rfc2231(s, charset: Optional[Any] = ..., language: Optional[Any] = ...): ... def decode_params(params): ... def collapse_rfc2231_value(value, errors=..., fallback_charset=...): ... diff --git a/stdlib/2/httplib.pyi b/stdlib/2/httplib.pyi index 8aec02558..09f9c5b5a 100644 --- a/stdlib/2/httplib.pyi +++ b/stdlib/2/httplib.pyi @@ -3,13 +3,13 @@ # Generated by stubgen and manually massaged a bit. # Needs lots more work! -from typing import Any, Dict +from typing import Any, Dict, Optional import mimetools class HTTPMessage(mimetools.Message): - def addheader(self, key: str, value: str) -> None: ... def addcontinue(self, key: str, more: str) -> None: ... dict = ... # type: Dict[str, str] + def addheader(self, key: str, value: str) -> None: ... unixfrom = ... # type: str headers = ... # type: Any status = ... # type: str @@ -28,13 +28,14 @@ class HTTPResponse: chunk_left = ... # type: Any length = ... # type: Any will_close = ... # type: Any - def __init__(self, sock, debuglevel=0, strict=0, method=None, buffering: bool = ...) -> None: ... + def __init__(self, sock, debuglevel: int = ..., strict: int = ..., method: Optional[Any] = ..., + buffering: bool = ...) -> None: ... def begin(self): ... def close(self): ... def isclosed(self): ... - def read(self, amt=None): ... + def read(self, amt: Optional[Any] = ...): ... def fileno(self): ... - def getheader(self, name, default=None): ... + def getheader(self, name, default: Optional[Any] = ...): ... def getheaders(self): ... class HTTPConnection: @@ -48,22 +49,23 @@ class HTTPConnection: sock = ... # type: Any host: str = ... port: int = ... - def __init__(self, host, port=None, strict=None, timeout=..., source_address=None) -> None: ... - def set_tunnel(self, host, port=None, headers=None): ... + def __init__(self, host, port: Optional[Any] = ..., strict: Optional[Any] = ..., timeout=..., + source_address: Optional[Any] = ...) -> None: ... + def set_tunnel(self, host, port: Optional[Any] = ..., headers: Optional[Any] = ...): ... 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: int = ..., skip_accept_encoding: int = ...): ... def putheader(self, header, *values): ... - def endheaders(self, message_body=None): ... - def request(self, method, url, body=None, headers=...): ... + def endheaders(self, message_body: Optional[Any] = ...): ... + def request(self, method, url, body: Optional[Any] = ..., headers=...): ... def getresponse(self, buffering: bool = ...): ... class HTTP: debuglevel = ... # type: Any - def __init__(self, host: str = ..., port=None, strict=None) -> None: ... - def connect(self, host=None, port=None): ... + def __init__(self, host: str = ..., port: Optional[Any] = ..., strict: Optional[Any] = ...) -> None: ... + def connect(self, host: Optional[Any] = ..., port: Optional[Any] = ...): ... def getfile(self): ... file = ... # type: Any headers = ... # type: Any @@ -74,14 +76,16 @@ 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, strict=None, timeout=..., source_address=None, context=None) -> None: ... + def __init__(self, host, port: Optional[Any] = ..., key_file: Optional[Any] = ..., cert_file: Optional[Any] = ..., + strict: Optional[Any] = ..., timeout=..., source_address: Optional[Any] = ..., + context: Optional[Any] = ...) -> None: ... sock = ... # type: Any def connect(self): ... class HTTPS(HTTP): key_file = ... # type: Any cert_file = ... # type: Any - def __init__(self, host: str = ..., port=None, key_file=None, cert_file=None, strict=None, context=None) -> None: ... + def __init__(self, host: str = ..., port: Optional[Any] = ..., key_file: Optional[Any] = ..., cert_file: Optional[Any] = ..., strict: Optional[Any] = ..., context: Optional[Any] = ...) -> None: ... class HTTPException(Exception): ... class NotConnected(HTTPException): ... @@ -99,7 +103,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: Optional[Any] = ...) -> None: ... class ImproperConnectionState(HTTPException): ... class CannotSendRequest(ImproperConnectionState): ... @@ -119,9 +123,9 @@ error = ... # type: Any class LineAndFileWrapper: def __init__(self, line, file) -> None: ... def __getattr__(self, attr): ... - def read(self, amt=None): ... + def read(self, amt: Optional[Any] = ...): ... def readline(self): ... - def readlines(self, size=None): ... + def readlines(self, size: Optional[Any] = ...): ... # Constants diff --git a/stdlib/2/mimetools.pyi b/stdlib/2/mimetools.pyi index a2651318c..99ef5566f 100644 --- a/stdlib/2/mimetools.pyi +++ b/stdlib/2/mimetools.pyi @@ -4,7 +4,7 @@ import rfc822 class Message(rfc822.Message): encodingheader = ... # type: Any typeheader = ... # type: Any - def __init__(self, fp, seekable=1): ... + def __init__(self, fp, seekable: int = ...): ... plisttext = ... # type: Any type = ... # type: Any maintype = ... # type: Any diff --git a/stdlib/2/multiprocessing/__init__.pyi b/stdlib/2/multiprocessing/__init__.pyi index d5c93250f..fb00b245c 100644 --- a/stdlib/2/multiprocessing/__init__.pyi +++ b/stdlib/2/multiprocessing/__init__.pyi @@ -26,19 +26,19 @@ class Queue(_BaseQueue[_T]): def cancel_join_thread(self) -> None: ... def Manager(): ... -def Pipe(duplex=True): ... +def Pipe(duplex: bool = ...): ... def cpu_count() -> int: ... def freeze_support(): ... def get_logger(): ... -def log_to_stderr(level=None): ... +def log_to_stderr(level: Optional[Any] = ...): ... def allow_connection_pickling(): ... def Lock(): ... def RLock(): ... -def Condition(lock=None): ... -def Semaphore(value=1): ... -def BoundedSemaphore(value=1): ... +def Condition(lock: Optional[Any] = ...): ... +def Semaphore(value: int = ...): ... +def BoundedSemaphore(value: int = ...): ... def Event(): ... -def JoinableQueue(maxsize=0): ... +def JoinableQueue(maxsize: int = ...): ... def RawValue(typecode_or_type, *args): ... def RawArray(typecode_or_type, size_or_initializer): ... def Value(typecode_or_type, *args, **kwds): ... diff --git a/stdlib/2/multiprocessing/process.pyi b/stdlib/2/multiprocessing/process.pyi index c4a84a421..e26b18c91 100644 --- a/stdlib/2/multiprocessing/process.pyi +++ b/stdlib/2/multiprocessing/process.pyi @@ -1,14 +1,15 @@ -from typing import Any +from typing import Any, Optional def current_process(): ... def active_children(): ... class Process: - def __init__(self, group=None, target=None, name=None, args=..., kwargs=...): ... + def __init__(self, group: Optional[Any] = ..., target: Optional[Any] = ..., name: Optional[Any] = ..., args=..., + kwargs=...): ... def run(self): ... def start(self): ... def terminate(self): ... - def join(self, timeout=None): ... + def join(self, timeout: Optional[Any] = ...): ... def is_alive(self): ... @property def name(self): ... diff --git a/stdlib/2/multiprocessing/util.pyi b/stdlib/2/multiprocessing/util.pyi index 7d116273d..4414c66b1 100644 --- a/stdlib/2/multiprocessing/util.pyi +++ b/stdlib/2/multiprocessing/util.pyi @@ -1,4 +1,4 @@ -from typing import Any +from typing import Any, Optional import threading SUBDEBUG = ... # type: Any @@ -9,13 +9,13 @@ def debug(msg, *args): ... def info(msg, *args): ... def sub_warning(msg, *args): ... def get_logger(): ... -def log_to_stderr(level=None): ... +def log_to_stderr(level: Optional[Any] = ...): ... def get_temp_dir(): ... def register_after_fork(obj, func): ... class Finalize: - def __init__(self, obj, callback, args=..., kwargs=None, exitpriority=None): ... - def __call__(self, wr=None): ... + def __init__(self, obj, callback, args=..., kwargs: Optional[Any] = ..., exitpriority: Optional[Any] = ...): ... + def __call__(self, wr: Optional[Any] = ...): ... def cancel(self): ... def still_active(self): ... diff --git a/stdlib/2/platform.pyi b/stdlib/2/platform.pyi index 75125f876..034023bdc 100644 --- a/stdlib/2/platform.pyi +++ b/stdlib/2/platform.pyi @@ -2,13 +2,13 @@ # # Based on stub generated by stubgen. -from typing import Any +from typing import Any, Optional __copyright__ = ... # type: Any DEV_NULL = ... # type: Any -def libc_ver(executable=..., lib=..., version=..., chunksize=2048): ... -def linux_distribution(distname=..., version=..., id=..., supported_dists=..., full_distribution_name=1): ... +def libc_ver(executable=..., lib=..., version=..., chunksize: int = ...): ... +def linux_distribution(distname=..., version=..., id=..., supported_dists=..., full_distribution_name: int = ...): ... def dist(distname=..., version=..., id=..., supported_dists=...): ... class _popen: @@ -16,13 +16,13 @@ class _popen: pipe = ... # type: Any bufsize = ... # type: Any mode = ... # type: Any - def __init__(self, cmd, mode=..., bufsize=None): ... + def __init__(self, cmd, mode=..., bufsize: Optional[Any] = ...): ... def read(self): ... def readlines(self): ... def close(self, remove=..., error=...): ... __del__ = ... # type: Any -def popen(cmd, mode=..., bufsize=None): ... +def popen(cmd, mode=..., bufsize: Optional[Any] = ...): ... def win32_ver(release=..., version=..., csd=..., ptype=...): ... def mac_ver(release=..., versioninfo=..., machine=...): ... def java_ver(release=..., vendor=..., vminfo=..., osinfo=...): ... @@ -42,4 +42,4 @@ def python_branch(): ... def python_revision(): ... def python_build(): ... def python_compiler(): ... -def platform(aliased=0, terse=0): ... +def platform(aliased: int = ..., terse: int = ...): ... diff --git a/stdlib/2/rfc822.pyi b/stdlib/2/rfc822.pyi index 28ba75942..2e37e9483 100644 --- a/stdlib/2/rfc822.pyi +++ b/stdlib/2/rfc822.pyi @@ -2,14 +2,14 @@ # # Based on stub generated by stubgen. -from typing import Any +from typing import Any, Optional class Message: fp = ... # type: Any seekable = ... # type: Any startofheaders = ... # type: Any startofbody = ... # type: Any - def __init__(self, fp, seekable=1): ... + def __init__(self, fp, seekable: int = ...): ... def rewindbody(self): ... dict = ... # type: Any unixfrom = ... # type: Any @@ -22,7 +22,7 @@ class Message: def getallmatchingheaders(self, name): ... def getfirstmatchingheader(self, name): ... def getrawheader(self, name): ... - def getheader(self, name, default=None): ... + def getheader(self, name, default: Optional[Any] = ...): ... get = ... # type: Any def getheaders(self, name): ... def getaddr(self, name): ... @@ -57,11 +57,11 @@ class AddrlistClass: def getrouteaddr(self): ... def getaddrspec(self): ... def getdomain(self): ... - def getdelimited(self, beginchar, endchars, allowcomments=1): ... + def getdelimited(self, beginchar, endchars, allowcomments: int = ...): ... def getquote(self): ... def getcomment(self): ... def getdomainliteral(self): ... - def getatom(self, atomends=None): ... + def getatom(self, atomends: Optional[Any] = ...): ... def getphraselist(self): ... class AddressList(AddrlistClass): diff --git a/stdlib/2/runpy.pyi b/stdlib/2/runpy.pyi index 193a320eb..846e492ba 100644 --- a/stdlib/2/runpy.pyi +++ b/stdlib/2/runpy.pyi @@ -1,4 +1,4 @@ -from typing import Any +from typing import Any, Optional class _TempModule: mod_name = ... # type: Any @@ -13,5 +13,5 @@ class _ModifiedArgv0: def __enter__(self): ... def __exit__(self, *args): ... -def run_module(mod_name, init_globals=None, run_name=None, alter_sys=False): ... -def run_path(path_name, init_globals=None, run_name=None): ... +def run_module(mod_name, init_globals: Optional[Any] = ..., run_name: Optional[Any] = ..., alter_sys: bool = ...): ... +def run_path(path_name, init_globals: Optional[Any] = ..., run_name: Optional[Any] = ...): ... diff --git a/stdlib/2/urllib2.pyi b/stdlib/2/urllib2.pyi index 136b269cd..c82560d8b 100644 --- a/stdlib/2/urllib2.pyi +++ b/stdlib/2/urllib2.pyi @@ -82,7 +82,7 @@ class HTTPRedirectHandler(BaseHandler): class ProxyHandler(BaseHandler): - def __init__(self, proxies=None): ... + def __init__(self, proxies: Optional[Any] = ...): ... def proxy_open(self, req, proxy, type): ... class HTTPPasswordMgr: @@ -138,12 +138,12 @@ class HTTPHandler(AbstractHTTPHandler): def http_request(self, request): ... class HTTPSHandler(AbstractHTTPHandler): - def __init__(self, debuglevel=0, context=None): ... + def __init__(self, debuglevel: int = ..., context: Optional[Any] = ...): ... def https_open(self, req): ... def https_request(self, request): ... class HTTPCookieProcessor(BaseHandler): - def __init__(self, cookiejar=None): ... + def __init__(self, cookiejar: Optional[Any] = ...): ... def http_request(self, request): ... def http_response(self, request, response): ... diff --git a/stdlib/2and3/fractions.pyi b/stdlib/2and3/fractions.pyi index b16af6346..8bebe5fc8 100644 --- a/stdlib/2and3/fractions.pyi +++ b/stdlib/2and3/fractions.pyi @@ -4,7 +4,7 @@ # Note: these stubs are incomplete. The more complex type # signatures are currently omitted. Also see numbers.pyi. -from typing import Optional, TypeVar, Union, overload +from typing import Optional, TypeVar, Union, overload, Any from numbers import Real, Integral, Rational from decimal import Decimal import sys @@ -74,7 +74,7 @@ class Fraction(Rational): if sys.version_info >= (3, 0): def __floor__(self) -> int: ... def __ceil__(self) -> int: ... - def __round__(self, ndigits=None): ... + def __round__(self, ndigits: Optional[Any] = ...): ... def __hash__(self) -> int: ... def __eq__(self, other: object) -> bool: ... diff --git a/stdlib/2and3/numbers.pyi b/stdlib/2and3/numbers.pyi index b5fc580be..50b561c24 100644 --- a/stdlib/2and3/numbers.pyi +++ b/stdlib/2and3/numbers.pyi @@ -5,7 +5,7 @@ # Note: these stubs are incomplete. The more complex type # signatures are currently omitted. -from typing import Optional, SupportsFloat +from typing import Any, Optional, SupportsFloat from abc import ABCMeta, abstractmethod import sys @@ -110,7 +110,7 @@ class Integral(Rational): def __long__(self) -> long: ... def __index__(self) -> int: ... @abstractmethod - def __pow__(self, exponent, modulus=None): ... + def __pow__(self, exponent, modulus: Optional[Any] = ...): ... @abstractmethod def __lshift__(self, other): ... @abstractmethod diff --git a/stdlib/3/_compression.pyi b/stdlib/3/_compression.pyi index d84a11a51..d46efa13b 100644 --- a/stdlib/3/_compression.pyi +++ b/stdlib/3/_compression.pyi @@ -11,6 +11,6 @@ class DecompressReader(io.RawIOBase): def close(self): ... def seekable(self): ... def readinto(self, b): ... - def read(self, size=-1): ... + def read(self, size: int = ...): ... def seek(self, offset, whence=...): ... def tell(self): ... diff --git a/stdlib/3/tkinter/__init__.pyi b/stdlib/3/tkinter/__init__.pyi index 6098bf332..f0a457980 100644 --- a/stdlib/3/tkinter/__init__.pyi +++ b/stdlib/3/tkinter/__init__.pyi @@ -15,7 +15,7 @@ class Event: ... def NoDefaultRoot(): ... class Variable: - def __init__(self, master=None, value=None, name=None): ... + def __init__(self, master: Optional[Any] = ..., value: Optional[Any] = ..., name: Optional[Any] = ...): ... def __del__(self): ... def set(self, value): ... initialize = ... # type: Any @@ -27,24 +27,24 @@ class Variable: def __eq__(self, other): ... class StringVar(Variable): - def __init__(self, master=None, value=None, name=None): ... + def __init__(self, master: Optional[Any] = ..., value: Optional[Any] = ..., name: Optional[Any] = ...): ... def get(self): ... class IntVar(Variable): - def __init__(self, master=None, value=None, name=None): ... + def __init__(self, master: Optional[Any] = ..., value: Optional[Any] = ..., name: Optional[Any] = ...): ... def get(self): ... class DoubleVar(Variable): - def __init__(self, master=None, value=None, name=None): ... + def __init__(self, master: Optional[Any] = ..., value: Optional[Any] = ..., name: Optional[Any] = ...): ... def get(self): ... class BooleanVar(Variable): - def __init__(self, master=None, value=None, name=None): ... + def __init__(self, master: Optional[Any] = ..., value: Optional[Any] = ..., name: Optional[Any] = ...): ... def set(self, value): ... initialize = ... # type: Any def get(self): ... -def mainloop(n=0): ... +def mainloop(n: int = ...): ... getint = ... # type: Any getdouble = ... # type: Any @@ -54,14 +54,14 @@ def getboolean(s): ... class Misc: def destroy(self): ... def deletecommand(self, name): ... - def tk_strictMotif(self, boolean=None): ... + def tk_strictMotif(self, boolean: Optional[Any] = ...): ... def tk_bisque(self): ... def tk_setPalette(self, *args, **kw): ... def tk_menuBar(self, *args): ... def wait_variable(self, name: str = ...): ... waitvar = ... # type: Any - def wait_window(self, window=None): ... - def wait_visibility(self, window=None): ... + def wait_window(self, window: Optional[Any] = ...): ... + def wait_visibility(self, window: Optional[Any] = ...): ... def setvar(self, name: str = ..., value: str = ...): ... def getvar(self, name: str = ...): ... def getint(self, s): ... @@ -76,10 +76,10 @@ class Misc: def tk_focusFollowsMouse(self): ... def tk_focusNext(self): ... def tk_focusPrev(self): ... - def after(self, ms, func=None, *args): ... + def after(self, ms, func: Optional[Any] = ..., *args): ... def after_idle(self, func, *args): ... def after_cancel(self, id): ... - def bell(self, displayof=0): ... + def bell(self, displayof: int = ...): ... def clipboard_get(self, **kw): ... def clipboard_clear(self, **kw): ... def clipboard_append(self, string, **kw): ... @@ -88,38 +88,38 @@ class Misc: def grab_set(self): ... def grab_set_global(self): ... def grab_status(self): ... - def option_add(self, pattern, value, priority=None): ... + def option_add(self, pattern, value, priority: Optional[Any] = ...): ... def option_clear(self): ... def option_get(self, name, className): ... - def option_readfile(self, fileName, priority=None): ... + def option_readfile(self, fileName, priority: Optional[Any] = ...): ... def selection_clear(self, **kw): ... def selection_get(self, **kw): ... def selection_handle(self, command, **kw): ... def selection_own(self, **kw): ... def selection_own_get(self, **kw): ... def send(self, interp, cmd, *args): ... - def lower(self, belowThis=None): ... - def tkraise(self, aboveThis=None): ... + def lower(self, belowThis: Optional[Any] = ...): ... + def tkraise(self, aboveThis: Optional[Any] = ...): ... lift = ... # type: Any - def winfo_atom(self, name, displayof=0): ... - def winfo_atomname(self, id, displayof=0): ... + def winfo_atom(self, name, displayof: int = ...): ... + def winfo_atomname(self, id, displayof: int = ...): ... def winfo_cells(self): ... def winfo_children(self): ... def winfo_class(self): ... def winfo_colormapfull(self): ... - def winfo_containing(self, rootX, rootY, displayof=0): ... + def winfo_containing(self, rootX, rootY, displayof: int = ...): ... def winfo_depth(self): ... def winfo_exists(self): ... def winfo_fpixels(self, number): ... def winfo_geometry(self): ... def winfo_height(self): ... def winfo_id(self): ... - def winfo_interps(self, displayof=0): ... + def winfo_interps(self, displayof: int = ...): ... def winfo_ismapped(self): ... def winfo_manager(self): ... def winfo_name(self): ... def winfo_parent(self): ... - def winfo_pathname(self, id, displayof=0): ... + def winfo_pathname(self, id, displayof: int = ...): ... def winfo_pixels(self, number): ... def winfo_pointerx(self): ... def winfo_pointerxy(self): ... @@ -142,7 +142,7 @@ class Misc: def winfo_viewable(self): ... def winfo_visual(self): ... def winfo_visualid(self): ... - def winfo_visualsavailable(self, includeids=0): ... + def winfo_visualsavailable(self, includeids: int = ...): ... def winfo_vrootheight(self): ... def winfo_vrootwidth(self): ... def winfo_vrootx(self): ... @@ -152,18 +152,18 @@ class Misc: def winfo_y(self): ... def update(self): ... def update_idletasks(self): ... - def bindtags(self, tagList=None): ... - def bind(self, sequence=None, func=None, add=None): ... - def unbind(self, sequence, funcid=None): ... - def bind_all(self, sequence=None, func=None, add=None): ... + def bindtags(self, tagList: Optional[Any] = ...): ... + def bind(self, sequence: Optional[Any] = ..., func: Optional[Any] = ..., add: Optional[Any] = ...): ... + def unbind(self, sequence, funcid: Optional[Any] = ...): ... + def bind_all(self, sequence: Optional[Any] = ..., func: Optional[Any] = ..., add: Optional[Any] = ...): ... def unbind_all(self, sequence): ... - def bind_class(self, className, sequence=None, func=None, add=None): ... + def bind_class(self, className, sequence: Optional[Any] = ..., func: Optional[Any] = ..., add: Optional[Any] = ...): ... def unbind_class(self, className, sequence): ... - def mainloop(self, n=0): ... + def mainloop(self, n: int = ...): ... def quit(self): ... def nametowidget(self, name): ... register = ... # type: Any - def configure(self, cnf=None, **kw): ... + def configure(self, cnf: Optional[Any] = ..., **kw): ... config = ... # type: Any def cget(self, key): ... __getitem__ = ... # type: Any @@ -174,9 +174,10 @@ class Misc: def pack_slaves(self): ... slaves = ... # type: Any def place_slaves(self): ... - def grid_anchor(self, anchor=None): ... + def grid_anchor(self, anchor: Optional[Any] = ...): ... anchor = ... # type: Any - def grid_bbox(self, column=None, row=None, col2=None, row2=None): ... + def grid_bbox(self, column: Optional[Any] = ..., row: Optional[Any] = ..., col2: Optional[Any] = ..., + row2: Optional[Any] = ...): ... bbox = ... # type: Any def grid_columnconfigure(self, index, cnf=..., **kw): ... columnconfigure = ... # type: Any @@ -186,11 +187,11 @@ class Misc: rowconfigure = ... # type: Any def grid_size(self): ... size = ... # type: Any - def grid_slaves(self, row=None, column=None): ... + def grid_slaves(self, row: Optional[Any] = ..., column: Optional[Any] = ...): ... def event_add(self, virtual, *sequences): ... def event_delete(self, virtual, *sequences): ... def event_generate(self, sequence, **kw): ... - def event_info(self, virtual=None): ... + def event_info(self, virtual: Optional[Any] = ...): ... def image_names(self): ... def image_types(self): ... @@ -212,65 +213,67 @@ class YView: def yview_scroll(self, number, what): ... class Wm: - def wm_aspect(self, minNumer=None, minDenom=None, maxNumer=None, maxDenom=None): ... + def wm_aspect(self, minNumer: Optional[Any] = ..., minDenom: Optional[Any] = ..., maxNumer: Optional[Any] = ..., + maxDenom: Optional[Any] = ...): ... aspect = ... # type: Any def wm_attributes(self, *args): ... attributes = ... # type: Any - def wm_client(self, name=None): ... + def wm_client(self, name: Optional[Any] = ...): ... client = ... # type: Any def wm_colormapwindows(self, *wlist): ... colormapwindows = ... # type: Any - def wm_command(self, value=None): ... + def wm_command(self, value: Optional[Any] = ...): ... command = ... # type: Any def wm_deiconify(self): ... deiconify = ... # type: Any - def wm_focusmodel(self, model=None): ... + def wm_focusmodel(self, model: Optional[Any] = ...): ... focusmodel = ... # type: Any def wm_forget(self, window): ... forget = ... # type: Any def wm_frame(self): ... frame = ... # type: Any - def wm_geometry(self, newGeometry=None): ... + def wm_geometry(self, newGeometry: Optional[Any] = ...): ... geometry = ... # type: Any - def wm_grid(self, baseWidth=None, baseHeight=None, widthInc=None, heightInc=None): ... + def wm_grid(self, baseWidth: Optional[Any] = ..., baseHeight: Optional[Any] = ..., widthInc: Optional[Any] = ..., + heightInc: Optional[Any] = ...): ... grid = ... # type: Any - def wm_group(self, pathName=None): ... + def wm_group(self, pathName: Optional[Any] = ...): ... group = ... # type: Any - def wm_iconbitmap(self, bitmap=None, default=None): ... + def wm_iconbitmap(self, bitmap: Optional[Any] = ..., default: Optional[Any] = ...): ... iconbitmap = ... # type: Any def wm_iconify(self): ... iconify = ... # type: Any - def wm_iconmask(self, bitmap=None): ... + def wm_iconmask(self, bitmap: Optional[Any] = ...): ... iconmask = ... # type: Any - def wm_iconname(self, newName=None): ... + def wm_iconname(self, newName: Optional[Any] = ...): ... iconname = ... # type: Any - def wm_iconphoto(self, default=False, *args): ... + def wm_iconphoto(self, default: bool = ..., *args): ... iconphoto = ... # type: Any - def wm_iconposition(self, x=None, y=None): ... + def wm_iconposition(self, x: Optional[Any] = ..., y: Optional[Any] = ...): ... iconposition = ... # type: Any - def wm_iconwindow(self, pathName=None): ... + def wm_iconwindow(self, pathName: Optional[Any] = ...): ... iconwindow = ... # type: Any def wm_manage(self, widget): ... manage = ... # type: Any - def wm_maxsize(self, width=None, height=None): ... + def wm_maxsize(self, width: Optional[Any] = ..., height: Optional[Any] = ...): ... maxsize = ... # type: Any - def wm_minsize(self, width=None, height=None): ... + def wm_minsize(self, width: Optional[Any] = ..., height: Optional[Any] = ...): ... minsize = ... # type: Any - def wm_overrideredirect(self, boolean=None): ... + def wm_overrideredirect(self, boolean: Optional[Any] = ...): ... overrideredirect = ... # type: Any - def wm_positionfrom(self, who=None): ... + def wm_positionfrom(self, who: Optional[Any] = ...): ... positionfrom = ... # type: Any - def wm_protocol(self, name=None, func=None): ... + def wm_protocol(self, name: Optional[Any] = ..., func: Optional[Any] = ...): ... protocol = ... # type: Any - def wm_resizable(self, width=None, height=None): ... + def wm_resizable(self, width: Optional[Any] = ..., height: Optional[Any] = ...): ... resizable = ... # type: Any - def wm_sizefrom(self, who=None): ... + def wm_sizefrom(self, who: Optional[Any] = ...): ... sizefrom = ... # type: Any - def wm_state(self, newstate=None): ... + def wm_state(self, newstate: Optional[Any] = ...): ... state = ... # type: Any - def wm_title(self, string=None): ... + def wm_title(self, string: Optional[Any] = ...): ... title = ... # type: Any - def wm_transient(self, master=None): ... + def wm_transient(self, master: Optional[Any] = ...): ... transient = ... # type: Any def wm_withdraw(self): ... withdraw = ... # type: Any @@ -287,7 +290,7 @@ class Tk(Misc, Wm): report_callback_exception: Callable[[Type[BaseException], BaseException, TracebackType], Any] def __getattr__(self, attr: str) -> Any: ... -def Tcl(screenName=None, baseName=None, className: str = ..., useTk=0): ... +def Tcl(screenName: Optional[Any] = ..., baseName: Optional[Any] = ..., className: str = ..., useTk: bool = ...): ... class Pack: def pack_configure(self, cnf=..., **kw): ... @@ -332,28 +335,28 @@ class BaseWidget(Misc): class Widget(BaseWidget, Pack, Place, Grid): ... class Toplevel(BaseWidget, Wm): - def __init__(self, master=None, cnf=..., **kw): ... + def __init__(self, master: Optional[Any] = ..., cnf=..., **kw): ... class Button(Widget): - def __init__(self, master=None, cnf=..., **kw): ... + def __init__(self, master: Optional[Any] = ..., cnf=..., **kw): ... def flash(self): ... def invoke(self): ... class Canvas(Widget, XView, YView): - def __init__(self, master=None, cnf=..., **kw): ... + def __init__(self, master: Optional[Any] = ..., cnf=..., **kw): ... def addtag(self, *args): ... def addtag_above(self, newtag, tagOrId): ... def addtag_all(self, newtag): ... def addtag_below(self, newtag, tagOrId): ... - def addtag_closest(self, newtag, x, y, halo=None, start=None): ... + def addtag_closest(self, newtag, x, y, halo: Optional[Any] = ..., start: Optional[Any] = ...): ... def addtag_enclosed(self, newtag, x1, y1, x2, y2): ... def addtag_overlapping(self, newtag, x1, y1, x2, y2): ... def addtag_withtag(self, newtag, tagOrId): ... def bbox(self, *args): ... - def tag_unbind(self, tagOrId, sequence, funcid=None): ... - def tag_bind(self, tagOrId, sequence=None, func=None, add=None): ... - def canvasx(self, screenx, gridspacing=None): ... - def canvasy(self, screeny, gridspacing=None): ... + def tag_unbind(self, tagOrId, sequence, funcid: Optional[Any] = ...): ... + def tag_bind(self, tagOrId, sequence: Optional[Any] = ..., func: Optional[Any] = ..., add: Optional[Any] = ...): ... + def canvasx(self, screenx, gridspacing: Optional[Any] = ...): ... + def canvasy(self, screeny, gridspacing: Optional[Any] = ...): ... def coords(self, *args): ... def create_arc(self, *args, **kw): ... def create_bitmap(self, *args, **kw): ... @@ -371,7 +374,7 @@ class Canvas(Widget, XView, YView): def find_above(self, tagOrId): ... def find_all(self): ... def find_below(self, tagOrId): ... - def find_closest(self, x, y, halo=None, start=None): ... + def find_closest(self, x, y, halo: Optional[Any] = ..., start: Optional[Any] = ...): ... def find_enclosed(self, x1, y1, x2, y2): ... def find_overlapping(self, x1, y1, x2, y2): ... def find_withtag(self, tagOrId): ... @@ -381,7 +384,7 @@ class Canvas(Widget, XView, YView): def index(self, *args): ... def insert(self, *args): ... def itemcget(self, tagOrId, option): ... - def itemconfigure(self, tagOrId, cnf=None, **kw): ... + def itemconfigure(self, tagOrId, cnf: Optional[Any] = ..., **kw): ... itemconfig = ... # type: Any def tag_lower(self, *args): ... lower = ... # type: Any @@ -391,7 +394,7 @@ class Canvas(Widget, XView, YView): lift = ... # type: Any def scale(self, *args): ... def scan_mark(self, x, y): ... - def scan_dragto(self, x, y, gain=10): ... + def scan_dragto(self, x, y, gain: int = ...): ... def select_adjust(self, tagOrId, index): ... def select_clear(self): ... def select_from(self, tagOrId, index): ... @@ -400,7 +403,7 @@ class Canvas(Widget, XView, YView): def type(self, tagOrId): ... class Checkbutton(Widget): - def __init__(self, master=None, cnf=..., **kw): ... + def __init__(self, master: Optional[Any] = ..., cnf=..., **kw): ... def deselect(self): ... def flash(self): ... def invoke(self): ... @@ -408,8 +411,8 @@ class Checkbutton(Widget): def toggle(self): ... class Entry(Widget, XView): - def __init__(self, master=None, cnf=..., **kw): ... - def delete(self, first, last=None): ... + def __init__(self, master: Optional[Any] = ..., cnf=..., **kw): ... + def delete(self, first, last: Optional[Any] = ...): ... def get(self): ... def icursor(self, index): ... def index(self, index): ... @@ -430,18 +433,18 @@ class Entry(Widget, XView): select_to = ... # type: Any class Frame(Widget): - def __init__(self, master=None, cnf=..., **kw): ... + def __init__(self, master: Optional[Any] = ..., cnf=..., **kw): ... class Label(Widget): - def __init__(self, master=None, cnf=..., **kw): ... + def __init__(self, master: Optional[Any] = ..., cnf=..., **kw): ... class Listbox(Widget, XView, YView): - def __init__(self, master=None, cnf=..., **kw): ... + def __init__(self, master: Optional[Any] = ..., cnf=..., **kw): ... def activate(self, index): ... def bbox(self, index): ... def curselection(self): ... - def delete(self, first, last=None): ... - def get(self, first, last=None): ... + def delete(self, first, last: Optional[Any] = ...): ... + def get(self, first, last: Optional[Any] = ...): ... def index(self, index): ... def insert(self, index, *elements): ... def nearest(self, y): ... @@ -450,19 +453,19 @@ class Listbox(Widget, XView, YView): def see(self, index): ... def selection_anchor(self, index): ... select_anchor = ... # type: Any - def selection_clear(self, first, last=None): ... + def selection_clear(self, first, last: Optional[Any] = ...): ... # type: ignore select_clear = ... # type: Any def selection_includes(self, index): ... select_includes = ... # type: Any - def selection_set(self, first, last=None): ... + def selection_set(self, first, last: Optional[Any] = ...): ... select_set = ... # type: Any def size(self): ... def itemcget(self, index, option): ... - def itemconfigure(self, index, cnf=None, **kw): ... + def itemconfigure(self, index, cnf: Optional[Any] = ..., **kw): ... itemconfig = ... # type: Any class Menu(Widget): - def __init__(self, master=None, cnf=..., **kw): ... + def __init__(self, master: Optional[Any] = ..., cnf=..., **kw): ... def tk_popup(self, x, y, entry: str = ...): ... def tk_bindForTraversal(self): ... def activate(self, index): ... @@ -478,9 +481,9 @@ class Menu(Widget): def insert_command(self, index, cnf=..., **kw): ... def insert_radiobutton(self, index, cnf=..., **kw): ... def insert_separator(self, index, cnf=..., **kw): ... - def delete(self, index1, index2=None): ... + def delete(self, index1, index2: Optional[Any] = ...): ... def entrycget(self, index, option): ... - def entryconfigure(self, index, cnf=None, **kw): ... + def entryconfigure(self, index, cnf: Optional[Any] = ..., **kw): ... entryconfig = ... # type: Any def index(self, index): ... def invoke(self, index): ... @@ -491,28 +494,28 @@ class Menu(Widget): def yposition(self, index): ... class Menubutton(Widget): - def __init__(self, master=None, cnf=..., **kw): ... + def __init__(self, master: Optional[Any] = ..., cnf=..., **kw): ... class Message(Widget): - def __init__(self, master=None, cnf=..., **kw): ... + def __init__(self, master: Optional[Any] = ..., cnf=..., **kw): ... class Radiobutton(Widget): - def __init__(self, master=None, cnf=..., **kw): ... + def __init__(self, master: Optional[Any] = ..., cnf=..., **kw): ... def deselect(self): ... def flash(self): ... def invoke(self): ... def select(self): ... class Scale(Widget): - def __init__(self, master=None, cnf=..., **kw): ... + def __init__(self, master: Optional[Any] = ..., cnf=..., **kw): ... def get(self): ... def set(self, value): ... - def coords(self, value=None): ... + def coords(self, value: Optional[Any] = ...): ... def identify(self, x, y): ... class Scrollbar(Widget): - def __init__(self, master=None, cnf=..., **kw): ... - def activate(self, index=None): ... + def __init__(self, master: Optional[Any] = ..., cnf=..., **kw): ... + def activate(self, index: Optional[Any] = ...): ... def delta(self, deltax, deltay): ... def fraction(self, x, y): ... def identify(self, x, y): ... @@ -520,28 +523,28 @@ class Scrollbar(Widget): def set(self, first, last): ... class Text(Widget, XView, YView): - def __init__(self, master=None, cnf=..., **kw): ... + def __init__(self, master: Optional[Any] = ..., cnf=..., **kw): ... def bbox(self, index): ... def compare(self, index1, op, index2): ... def count(self, index1, index2, *args): ... - def debug(self, boolean=None): ... - def delete(self, index1, index2=None): ... + def debug(self, boolean: Optional[Any] = ...): ... + def delete(self, index1, index2: Optional[Any] = ...): ... def dlineinfo(self, index): ... - def dump(self, index1, index2=None, command=None, **kw): ... + def dump(self, index1, index2: Optional[Any] = ..., command: Optional[Any] = ..., **kw): ... def edit(self, *args): ... - def edit_modified(self, arg=None): ... + def edit_modified(self, arg: Optional[Any] = ...): ... def edit_redo(self): ... def edit_reset(self): ... def edit_separator(self): ... def edit_undo(self): ... - def get(self, index1, index2=None): ... + def get(self, index1, index2: Optional[Any] = ...): ... def image_cget(self, index, option): ... - def image_configure(self, index, cnf=None, **kw): ... + def image_configure(self, index, cnf: Optional[Any] = ..., **kw): ... def image_create(self, index, cnf=..., **kw): ... def image_names(self): ... def index(self, index): ... def insert(self, index, chars, *args): ... - def mark_gravity(self, markName, direction=None): ... + def mark_gravity(self, markName, direction: Optional[Any] = ...): ... def mark_names(self): ... def mark_set(self, markName, index): ... def mark_unset(self, *markNames): ... @@ -552,31 +555,33 @@ class Text(Widget, XView, YView): def replace(self, index1, index2, chars, *args): ... def scan_mark(self, x, y): ... def scan_dragto(self, x, y): ... - def search(self, pattern, index, stopindex=None, forwards=None, backwards=None, exact=None, regexp=None, nocase=None, count=None, elide=None): ... + def search(self, pattern, index, stopindex: Optional[Any] = ..., forwards: Optional[Any] = ..., + backwards: Optional[Any] = ..., exact: Optional[Any] = ..., regexp: Optional[Any] = ..., + nocase: Optional[Any] = ..., count: Optional[Any] = ..., elide: Optional[Any] = ...): ... def see(self, index): ... def tag_add(self, tagName, index1, *args): ... - def tag_unbind(self, tagName, sequence, funcid=None): ... - def tag_bind(self, tagName, sequence, func, add=None): ... + def tag_unbind(self, tagName, sequence, funcid: Optional[Any] = ...): ... + def tag_bind(self, tagName, sequence, func, add: Optional[Any] = ...): ... def tag_cget(self, tagName, option): ... - def tag_configure(self, tagName, cnf=None, **kw): ... + def tag_configure(self, tagName, cnf: Optional[Any] = ..., **kw): ... tag_config = ... # type: Any def tag_delete(self, *tagNames): ... - def tag_lower(self, tagName, belowThis=None): ... - def tag_names(self, index=None): ... - def tag_nextrange(self, tagName, index1, index2=None): ... - def tag_prevrange(self, tagName, index1, index2=None): ... - def tag_raise(self, tagName, aboveThis=None): ... + def tag_lower(self, tagName, belowThis: Optional[Any] = ...): ... + def tag_names(self, index: Optional[Any] = ...): ... + def tag_nextrange(self, tagName, index1, index2: Optional[Any] = ...): ... + def tag_prevrange(self, tagName, index1, index2: Optional[Any] = ...): ... + def tag_raise(self, tagName, aboveThis: Optional[Any] = ...): ... def tag_ranges(self, tagName): ... - def tag_remove(self, tagName, index1, index2=None): ... + def tag_remove(self, tagName, index1, index2: Optional[Any] = ...): ... def window_cget(self, index, option): ... - def window_configure(self, index, cnf=None, **kw): ... + def window_configure(self, index, cnf: Optional[Any] = ..., **kw): ... window_config = ... # type: Any def window_create(self, index, cnf=..., **kw): ... def window_names(self): ... def yview_pickplace(self, *what): ... class _setit: - def __init__(self, var, value, callback=None): ... + def __init__(self, var, value, callback: Optional[Any] = ...): ... def __call__(self, *args): ... class OptionMenu(Menubutton): @@ -589,7 +594,7 @@ class OptionMenu(Menubutton): class Image: name = ... # type: Any tk = ... # type: Any - def __init__(self, imgtype, name=None, cnf=..., master=None, **kw): ... + def __init__(self, imgtype, name: Optional[Any] = ..., cnf=..., master: Optional[Any] = ..., **kw): ... def __del__(self): ... def __setitem__(self, key, value): ... def __getitem__(self, key): ... @@ -600,7 +605,7 @@ class Image: def width(self): ... class PhotoImage(Image): - def __init__(self, name=None, cnf=..., master=None, **kw): ... + def __init__(self, name: Optional[Any] = ..., cnf=..., master: Optional[Any] = ..., **kw): ... def blank(self): ... def cget(self, option): ... def __getitem__(self, key): ... @@ -608,19 +613,19 @@ class PhotoImage(Image): def zoom(self, x, y: str = ...): ... def subsample(self, x, y: str = ...): ... def get(self, x, y): ... - def put(self, data, to=None): ... - def write(self, filename, format=None, from_coords=None): ... + def put(self, data, to: Optional[Any] = ...): ... + def write(self, filename, format: Optional[Any] = ..., from_coords: Optional[Any] = ...): ... class BitmapImage(Image): - def __init__(self, name=None, cnf=..., master=None, **kw): ... + def __init__(self, name: Optional[Any] = ..., cnf=..., master: Optional[Any] = ..., **kw): ... def image_names(): ... def image_types(): ... class Spinbox(Widget, XView): - def __init__(self, master=None, cnf=..., **kw): ... + def __init__(self, master: Optional[Any] = ..., cnf=..., **kw): ... def bbox(self, index): ... - def delete(self, first, last=None): ... + def delete(self, first, last: Optional[Any] = ...): ... def get(self): ... def icursor(self, index): ... def identify(self, x, y): ... @@ -633,13 +638,13 @@ class Spinbox(Widget, XView): def selection(self, *args): ... def selection_adjust(self, index): ... def selection_clear(self): ... - def selection_element(self, element=None): ... + def selection_element(self, element: Optional[Any] = ...): ... class LabelFrame(Widget): - def __init__(self, master=None, cnf=..., **kw): ... + def __init__(self, master: Optional[Any] = ..., cnf=..., **kw): ... class PanedWindow(Widget): - def __init__(self, master=None, cnf=..., **kw): ... + def __init__(self, master: Optional[Any] = ..., cnf=..., **kw): ... def add(self, child, **kw): ... def remove(self, child): ... forget = ... # type: Any @@ -653,6 +658,6 @@ class PanedWindow(Widget): def sash_mark(self, index): ... def sash_place(self, index, x, y): ... def panecget(self, child, option): ... - def paneconfigure(self, tagOrId, cnf=None, **kw): ... + def paneconfigure(self, tagOrId, cnf: Optional[Any] = ..., **kw): ... paneconfig = ... # type: Any def panes(self): ... diff --git a/stdlib/3/tkinter/ttk.pyi b/stdlib/3/tkinter/ttk.pyi index b8073d0fe..8e690c473 100644 --- a/stdlib/3/tkinter/ttk.pyi +++ b/stdlib/3/tkinter/ttk.pyi @@ -1,110 +1,110 @@ import sys -from typing import Any +from typing import Any, Optional import tkinter def tclobjs_to_py(adict): ... -def setup_master(master=None): ... +def setup_master(master: Optional[Any] = ...): ... class Style: master = ... # type: Any tk = ... # type: Any - def __init__(self, master=None): ... - def configure(self, style, query_opt=None, **kw): ... - def map(self, style, query_opt=None, **kw): ... - def lookup(self, style, option, state=None, default=None): ... - def layout(self, style, layoutspec=None): ... + def __init__(self, master: Optional[Any] = ...): ... + def configure(self, style, query_opt: Optional[Any] = ..., **kw): ... + def map(self, style, query_opt: Optional[Any] = ..., **kw): ... + def lookup(self, style, option, state: Optional[Any] = ..., default: Optional[Any] = ...): ... + def layout(self, style, layoutspec: Optional[Any] = ...): ... def element_create(self, elementname, etype, *args, **kw): ... def element_names(self): ... def element_options(self, elementname): ... - def theme_create(self, themename, parent=None, settings=None): ... + def theme_create(self, themename, parent: Optional[Any] = ..., settings: Optional[Any] = ...): ... def theme_settings(self, themename, settings): ... def theme_names(self): ... - def theme_use(self, themename=None): ... + def theme_use(self, themename: Optional[Any] = ...): ... class Widget(tkinter.Widget): - def __init__(self, master, widgetname, kw=None): ... + def __init__(self, master, widgetname, kw: Optional[Any] = ...): ... def identify(self, x, y): ... - def instate(self, statespec, callback=None, *args, **kw): ... - def state(self, statespec=None): ... + def instate(self, statespec, callback: Optional[Any] = ..., *args, **kw): ... + def state(self, statespec: Optional[Any] = ...): ... class Button(Widget): - def __init__(self, master=None, **kw): ... + def __init__(self, master: Optional[Any] = ..., **kw): ... def invoke(self): ... class Checkbutton(Widget): - def __init__(self, master=None, **kw): ... + def __init__(self, master: Optional[Any] = ..., **kw): ... def invoke(self): ... class Entry(Widget, tkinter.Entry): - def __init__(self, master=None, widget=None, **kw): ... + def __init__(self, master: Optional[Any] = ..., widget: Optional[Any] = ..., **kw): ... def bbox(self, index): ... def identify(self, x, y): ... def validate(self): ... class Combobox(Entry): - def __init__(self, master=None, **kw): ... - def current(self, newindex=None): ... + def __init__(self, master: Optional[Any] = ..., **kw): ... + def current(self, newindex: Optional[Any] = ...): ... def set(self, value): ... class Frame(Widget): - def __init__(self, master=None, **kw): ... + def __init__(self, master: Optional[Any] = ..., **kw): ... class Label(Widget): - def __init__(self, master=None, **kw): ... + def __init__(self, master: Optional[Any] = ..., **kw): ... class Labelframe(Widget): - def __init__(self, master=None, **kw): ... + def __init__(self, master: Optional[Any] = ..., **kw): ... LabelFrame = ... # type: Any class Menubutton(Widget): - def __init__(self, master=None, **kw): ... + def __init__(self, master: Optional[Any] = ..., **kw): ... class Notebook(Widget): - def __init__(self, master=None, **kw): ... + def __init__(self, master: Optional[Any] = ..., **kw): ... def add(self, child, **kw): ... def forget(self, tab_id): ... def hide(self, tab_id): ... def identify(self, x, y): ... def index(self, tab_id): ... def insert(self, pos, child, **kw): ... - def select(self, tab_id=None): ... - def tab(self, tab_id, option=None, **kw): ... + def select(self, tab_id: Optional[Any] = ...): ... + def tab(self, tab_id, option: Optional[Any] = ..., **kw): ... def tabs(self): ... def enable_traversal(self): ... class Panedwindow(Widget, tkinter.PanedWindow): - def __init__(self, master=None, **kw): ... + def __init__(self, master: Optional[Any] = ..., **kw): ... forget = ... # type: Any def insert(self, pos, child, **kw): ... - def pane(self, pane, option=None, **kw): ... - def sashpos(self, index, newpos=None): ... + def pane(self, pane, option: Optional[Any] = ..., **kw): ... + def sashpos(self, index, newpos: Optional[Any] = ...): ... PanedWindow = ... # type: Any class Progressbar(Widget): - def __init__(self, master=None, **kw): ... - def start(self, interval=None): ... - def step(self, amount=None): ... + def __init__(self, master: Optional[Any] = ..., **kw): ... + def start(self, interval: Optional[Any] = ...): ... + def step(self, amount: Optional[Any] = ...): ... def stop(self): ... class Radiobutton(Widget): - def __init__(self, master=None, **kw): ... + def __init__(self, master: Optional[Any] = ..., **kw): ... def invoke(self): ... class Scale(Widget, tkinter.Scale): - def __init__(self, master=None, **kw): ... - def configure(self, cnf=None, **kw): ... - def get(self, x=None, y=None): ... + def __init__(self, master: Optional[Any] = ..., **kw): ... + def configure(self, cnf: Optional[Any] = ..., **kw): ... + def get(self, x: Optional[Any] = ..., y: Optional[Any] = ...): ... class Scrollbar(Widget, tkinter.Scrollbar): - def __init__(self, master=None, **kw): ... + def __init__(self, master: Optional[Any] = ..., **kw): ... class Separator(Widget): - def __init__(self, master=None, **kw): ... + def __init__(self, master: Optional[Any] = ..., **kw): ... class Sizegrip(Widget): - def __init__(self, master=None, **kw): ... + def __init__(self, master: Optional[Any] = ..., **kw): ... if sys.version_info >= (3, 7): class Spinbox(Entry): @@ -112,49 +112,49 @@ if sys.version_info >= (3, 7): def set(self, value: Any) -> None: ... class Treeview(Widget, tkinter.XView, tkinter.YView): - def __init__(self, master=None, **kw): ... - def bbox(self, item, column=None): ... - def get_children(self, item=None): ... + def __init__(self, master: Optional[Any] = ..., **kw): ... + def bbox(self, item, column: Optional[Any] = ...): ... + def get_children(self, item: Optional[Any] = ...): ... def set_children(self, item, *newchildren): ... - def column(self, column, option=None, **kw): ... + def column(self, column, option: Optional[Any] = ..., **kw): ... def delete(self, *items): ... def detach(self, *items): ... def exists(self, item): ... - def focus(self, item=None): ... - def heading(self, column, option=None, **kw): ... + def focus(self, item: Optional[Any] = ...): ... + def heading(self, column, option: Optional[Any] = ..., **kw): ... def identify(self, component, x, y): ... def identify_row(self, y): ... def identify_column(self, x): ... def identify_region(self, x, y): ... def identify_element(self, x, y): ... def index(self, item): ... - def insert(self, parent, index, iid=None, **kw): ... - def item(self, item, option=None, **kw): ... + def insert(self, parent, index, iid: Optional[Any] = ..., **kw): ... + def item(self, item, option: Optional[Any] = ..., **kw): ... def move(self, item, parent, index): ... reattach = ... # type: Any def next(self, item): ... def parent(self, item): ... def prev(self, item): ... def see(self, item): ... - def selection(self, selop=None, items=None): ... + def selection(self, selop: Optional[Any] = ..., items: Optional[Any] = ...): ... def selection_set(self, items): ... def selection_add(self, items): ... def selection_remove(self, items): ... def selection_toggle(self, items): ... - def set(self, item, column=None, value=None): ... - def tag_bind(self, tagname, sequence=None, callback=None): ... - def tag_configure(self, tagname, option=None, **kw): ... - def tag_has(self, tagname, item=None): ... + def set(self, item, column: Optional[Any] = ..., value: Optional[Any] = ...): ... + def tag_bind(self, tagname, sequence: Optional[Any] = ..., callback: Optional[Any] = ...): ... + def tag_configure(self, tagname, option: Optional[Any] = ..., **kw): ... + def tag_has(self, tagname, item: Optional[Any] = ...): ... class LabeledScale(Frame): label = ... # type: Any scale = ... # type: Any - def __init__(self, master=None, variable=None, from_=0, to=10, **kw): ... + def __init__(self, master: Optional[Any] = ..., variable: Optional[Any] = ..., from_: int = ..., to: int = ..., **kw): ... def destroy(self): ... value = ... # type: Any class OptionMenu(Menubutton): - def __init__(self, master, variable, default=None, *values, **kwargs): ... + def __init__(self, master, variable, default: Optional[Any] = ..., *values, **kwargs): ... def __getitem__(self, item): ... - def set_menu(self, default=None, *values): ... + def set_menu(self, default: Optional[Any] = ..., *values): ... def destroy(self): ... diff --git a/third_party/2/itsdangerous.pyi b/third_party/2/itsdangerous.pyi index 0e3b074dd..7dee174ff 100644 --- a/third_party/2/itsdangerous.pyi +++ b/third_party/2/itsdangerous.pyi @@ -40,7 +40,7 @@ class BadTimeSignature(BadSignature): class BadHeader(BadSignature): header = ... # type: Any original_error = ... # type: Any - def __init__(self, message, payload=None, header=None, original_error=None) -> None: ... + def __init__(self, message, payload: Optional[Any] = ..., header: Optional[Any] = ..., original_error: Optional[Any] = ...) -> None: ... class SignatureExpired(BadTimeSignature): ... @@ -129,7 +129,7 @@ class JSONWebSignatureSerializer(Serializer): def dump_payload(self, *args, **kwargs) -> bytes: ... def make_algorithm(self, algorithm_name: str) -> SigningAlgorithm: ... def make_signer(self, salt: Optional[bytes_like] = ..., algorithm_name: Optional[str] = ...) -> Signer: ... - def make_header(self, header_fields: Optional[MutableMapping] = ...) -> MutableMapping: ... + def make_header(self, header_fields: Optional[MutableMapping]) -> MutableMapping: ... def dumps(self, obj: Any, salt: Optional[bytes_like] = ..., header_fields: Optional[MutableMapping] = ...) -> str: ... def loads(self, s: str, salt: Optional[bytes_like] = ..., return_header: bool = ...) -> Any: ... def loads_unsafe(self, s, salt: Optional[bytes_like] = ..., return_header: bool = ...) -> Tuple[bool, Any]: ... @@ -138,13 +138,13 @@ class TimedJSONWebSignatureSerializer(JSONWebSignatureSerializer): DEFAULT_EXPIRES_IN = ... # type: int expires_in = ... # type: int def __init__(self, secret_key: bytes_like, expires_in: Optional[int] = ..., **kwargs) -> None: ... - def make_header(self, header_fields=Optional[MutableMapping]) -> MutableMapping: ... + def make_header(self, header_fields: Optional[MutableMapping]) -> MutableMapping: ... def loads(self, s: str, salt: Optional[bytes_like] = ..., return_header: bool = ...) -> Any: ... def get_issue_date(self, header: MutableMapping) -> Optional[datetime]: ... def now(self) -> int: ... class URLSafeSerializerMixin: - def load_payload(self, payload: Any, serializer=None, return_header=False, **kwargs) \ + def load_payload(self, payload: Any, serializer: Optional[Any] = ..., return_header: bool = ..., **kwargs) \ -> Any: ... # FIXME: This is invalid but works around https://github.com/pallets/itsdangerous/issues/74 def dump_payload(self, *args, **kwargs) -> str: ... diff --git a/third_party/2/tornado/locks.pyi b/third_party/2/tornado/locks.pyi index eaeba24f8..3c693e04b 100644 --- a/third_party/2/tornado/locks.pyi +++ b/third_party/2/tornado/locks.pyi @@ -1,4 +1,4 @@ -from typing import Any +from typing import Any, Optional class _TimeoutGarbageCollector: def __init__(self): ... @@ -6,8 +6,8 @@ class _TimeoutGarbageCollector: class Condition(_TimeoutGarbageCollector): io_loop = ... # type: Any def __init__(self): ... - def wait(self, timeout=None): ... - def notify(self, n=1): ... + def wait(self, timeout: Optional[Any] = ...): ... + def notify(self, n: int = ...): ... def notify_all(self): ... class Event: @@ -15,7 +15,7 @@ class Event: def is_set(self): ... def set(self): ... def clear(self): ... - def wait(self, timeout=None): ... + def wait(self, timeout: Optional[Any] = ...): ... class _ReleasingContextManager: def __init__(self, obj): ... @@ -23,21 +23,21 @@ class _ReleasingContextManager: def __exit__(self, exc_type, exc_val, exc_tb): ... class Semaphore(_TimeoutGarbageCollector): - def __init__(self, value=1): ... + def __init__(self, value: int = ...): ... def release(self): ... - def acquire(self, timeout=None): ... + def acquire(self, timeout: Optional[Any] = ...): ... def __enter__(self): ... __exit__ = ... # type: Any def __aenter__(self): ... def __aexit__(self, typ, value, tb): ... class BoundedSemaphore(Semaphore): - def __init__(self, value=1): ... + def __init__(self, value: int = ...): ... def release(self): ... class Lock: def __init__(self): ... - def acquire(self, timeout=None): ... + def acquire(self, timeout: Optional[Any] = ...): ... def release(self): ... def __enter__(self): ... __exit__ = ... # type: Any diff --git a/third_party/2/tornado/testing.pyi b/third_party/2/tornado/testing.pyi index 5b8c6626d..bb3392f16 100644 --- a/third_party/2/tornado/testing.pyi +++ b/third_party/2/tornado/testing.pyi @@ -1,4 +1,4 @@ -from typing import Any +from typing import Any, Optional import unittest import logging @@ -18,9 +18,9 @@ class AsyncTestCase(unittest.TestCase): def setUp(self): ... def tearDown(self): ... def get_new_ioloop(self): ... - def run(self, result=None): ... - def stop(self, _arg=None, **kwargs): ... - def wait(self, condition=None, timeout=5): ... + def run(self, result: Optional[Any] = ...): ... + def stop(self, _arg: Optional[Any] = ..., **kwargs): ... + def wait(self, condition: Optional[Any] = ..., timeout: float = ...): ... class AsyncHTTPTestCase(AsyncTestCase): http_client = ... # type: Any @@ -45,14 +45,14 @@ class AsyncHTTPSTestCase(AsyncHTTPTestCase): def gen_test(f): ... class LogTrapTestCase(unittest.TestCase): - def run(self, result=None): ... + def run(self, result: Optional[Any] = ...): ... class ExpectLog(logging.Filter): logger = ... # type: Any regex = ... # type: Any required = ... # type: Any matched = ... # type: Any - def __init__(self, logger, regex, required=True): ... + def __init__(self, logger, regex, required: bool = ...): ... def filter(self, record): ... def __enter__(self): ... def __exit__(self, typ, value, tb): ... diff --git a/third_party/2and3/backports_abc.pyi b/third_party/2and3/backports_abc.pyi index 8deebc0cc..1db45337a 100644 --- a/third_party/2and3/backports_abc.pyi +++ b/third_party/2and3/backports_abc.pyi @@ -12,4 +12,4 @@ def isawaitable(obj): ... PATCHED = ... # type: Any -def patch(patch_inspect=True): ... +def patch(patch_inspect: bool = ...): ... diff --git a/third_party/2and3/click/exceptions.pyi b/third_party/2and3/click/exceptions.pyi index 6f08d7ac5..be80c0a36 100644 --- a/third_party/2and3/click/exceptions.pyi +++ b/third_party/2and3/click/exceptions.pyi @@ -1,4 +1,4 @@ -from typing import IO, List, Optional +from typing import IO, List, Optional, Any from click.core import Context, Parameter @@ -13,7 +13,7 @@ class ClickException(Exception): def format_message(self) -> str: ... - def show(self, file=None) -> None: + def show(self, file: Optional[Any] = ...) -> None: ... diff --git a/third_party/2and3/pymysql/connections.pyi b/third_party/2and3/pymysql/connections.pyi index 3789924b8..eace19c7d 100644 --- a/third_party/2and3/pymysql/connections.pyi +++ b/third_party/2and3/pymysql/connections.pyi @@ -50,9 +50,9 @@ class MysqlPacket: def read(self, size): ... def read_all(self): ... def advance(self, length): ... - def rewind(self, position=0): ... + def rewind(self, position: int = ...): ... def peek(self, size): ... - def get_bytes(self, position, length=1): ... + def get_bytes(self, position, length: int = ...): ... def read_length_coded_binary(self): ... def read_length_coded_string(self): ... def is_ok_packet(self): ... @@ -85,7 +85,12 @@ class Connection: encoders = ... # type: Any decoders = ... # type: Any host_info = ... # type: Any - def __init__(self, host='', user=None, passwd='', db=None, port=3306, unix_socket=None, charset='', sql_mode=None, read_default_file=None, conv=..., use_unicode=None, client_flag=0, cursorclass=..., init_command=None, connect_timeout=None, ssl=None, read_default_group=None, compress=None, named_pipe=None): ... + def __init__(self, host: str = ..., user: Optional[Any] = ..., passwd: str = ..., db: Optional[Any] = ..., + port: int = ..., unix_socket: Optional[Any] = ..., charset: str = ..., sql_mode: Optional[Any] = ..., + read_default_file: Optional[Any] = ..., conv=..., use_unicode: Optional[Any] = ..., client_flag: int = ..., + cursorclass=..., init_command: Optional[Any] = ..., connect_timeout: Optional[Any] = ..., + ssl: Optional[Any] = ..., read_default_group: Optional[Any] = ..., compress: Optional[Any] = ..., + named_pipe: Optional[Any] = ...): ... socket = ... # type: Any rfile = ... # type: Any wfile = ... # type: Any diff --git a/third_party/2and3/pymysql/cursors.pyi b/third_party/2and3/pymysql/cursors.pyi index 80f37c101..5d69dee63 100644 --- a/third_party/2and3/pymysql/cursors.pyi +++ b/third_party/2and3/pymysql/cursors.pyi @@ -18,7 +18,7 @@ class Cursor: def setinputsizes(self, *args): ... def setoutputsizes(self, *args): ... def nextset(self): ... - def execute(self, query: str, args=None) -> int: ... + def execute(self, query: str, args: Optional[Any] = ...) -> int: ... def executemany(self, query: str, args) -> int: ... def callproc(self, procname, args=...): ... def fetchone(self) -> Optional[Gen]: ... diff --git a/third_party/2and3/werkzeug/_compat.pyi b/third_party/2and3/werkzeug/_compat.pyi index 74981331c..36bd42bf2 100644 --- a/third_party/2and3/werkzeug/_compat.pyi +++ b/third_party/2and3/werkzeug/_compat.pyi @@ -1,5 +1,5 @@ import sys -from typing import Any +from typing import Any, Optional, Text if sys.version_info < (3,): import StringIO as BytesIO @@ -35,14 +35,14 @@ def try_coerce_native(s): ... wsgi_get_bytes = ... # type: Any -def wsgi_decoding_dance(s, charset='', errors=''): ... -def wsgi_encoding_dance(s, charset='', errors=''): ... -def to_bytes(x, charset=..., errors=''): ... -def to_native(x, charset=..., errors=''): ... -def reraise(tp, value, tb=None): ... +def wsgi_decoding_dance(s, charset: Text = ..., errors: Text = ...): ... +def wsgi_encoding_dance(s, charset: Text = ..., errors: Text = ...): ... +def to_bytes(x, charset: Text = ..., errors: Text = ...): ... +def to_native(x, charset: Text = ..., errors: Text = ...): ... +def reraise(tp, value, tb: Optional[Any] = ...): ... imap = ... # type: Any izip = ... # type: Any ifilter = ... # type: Any -def to_unicode(x, charset=..., errors='', allow_none_charset=False): ... +def to_unicode(x, charset: Text = ..., errors: Text = ..., allow_none_charset: bool = ...): ... diff --git a/third_party/2and3/werkzeug/_internal.pyi b/third_party/2and3/werkzeug/_internal.pyi index 6fddbdd77..4785da915 100644 --- a/third_party/2and3/werkzeug/_internal.pyi +++ b/third_party/2and3/werkzeug/_internal.pyi @@ -1,4 +1,4 @@ -from typing import Any +from typing import Any, Optional class _Missing: def __reduce__(self): ... @@ -10,9 +10,10 @@ class _DictAccessorProperty: load_func = ... # type: Any dump_func = ... # type: Any __doc__ = ... # type: Any - def __init__(self, name, default=None, load_func=None, dump_func=None, read_only=None, doc=None): ... - def __get__(self, obj, type=None): ... + def __init__(self, name, default: Optional[Any] = ..., load_func: Optional[Any] = ..., dump_func: Optional[Any] = ..., + read_only: Optional[Any] = ..., doc: Optional[Any] = ...): ... + def __get__(self, obj, type: Optional[Any] = ...): ... def __set__(self, obj, value): ... def __delete__(self, obj): ... -def _easteregg(app=None): ... +def _easteregg(app: Optional[Any] = ...): ... diff --git a/third_party/2and3/werkzeug/_reloader.pyi b/third_party/2and3/werkzeug/_reloader.pyi index 55a560d2f..309d2db51 100644 --- a/third_party/2and3/werkzeug/_reloader.pyi +++ b/third_party/2and3/werkzeug/_reloader.pyi @@ -1,10 +1,10 @@ -from typing import Any +from typing import Any, Optional class ReloaderLoop: name = ... # type: Any extra_files = ... # type: Any - interval = ... # type: Any - def __init__(self, extra_files=None, interval=1): ... + interval: float + def __init__(self, extra_files: Optional[Any] = ..., interval: float = ...): ... def run(self): ... def restart_with_reloader(self): ... def trigger_reload(self, filename): ... @@ -26,4 +26,4 @@ class WatchdogReloaderLoop(ReloaderLoop): reloader_loops = ... # type: Any -def run_with_reloader(main_func, extra_files=None, interval=1, reloader_type=''): ... +def run_with_reloader(main_func, extra_files: Optional[Any] = ..., interval: float = ..., reloader_type: str = ...): ... diff --git a/third_party/2and3/werkzeug/contrib/atom.pyi b/third_party/2and3/werkzeug/contrib/atom.pyi index 1e2787363..63d38f98b 100644 --- a/third_party/2and3/werkzeug/contrib/atom.pyi +++ b/third_party/2and3/werkzeug/contrib/atom.pyi @@ -1,4 +1,4 @@ -from typing import Any +from typing import Any, Optional XHTML_NAMESPACE = ... # type: Any @@ -22,7 +22,7 @@ class AtomFeed: generator = ... # type: Any links = ... # type: Any entries = ... # type: Any - def __init__(self, title=None, entries=None, **kwargs): ... + def __init__(self, title: Optional[Any] = ..., entries: Optional[Any] = ..., **kwargs): ... def add(self, *args, **kwargs): ... def generate(self): ... def to_string(self): ... @@ -45,6 +45,6 @@ class FeedEntry: links = ... # type: Any categories = ... # type: Any xml_base = ... # type: Any - def __init__(self, title=None, content=None, feed_url=None, **kwargs): ... + def __init__(self, title: Optional[Any] = ..., content: Optional[Any] = ..., feed_url: Optional[Any] = ..., **kwargs): ... def generate(self): ... def to_string(self): ... diff --git a/third_party/2and3/werkzeug/contrib/cache.pyi b/third_party/2and3/werkzeug/contrib/cache.pyi index 2b8abb767..74ca5140c 100644 --- a/third_party/2and3/werkzeug/contrib/cache.pyi +++ b/third_party/2and3/werkzeug/contrib/cache.pyi @@ -1,83 +1,84 @@ -from typing import Any +from typing import Any, Optional class BaseCache: - default_timeout = ... # type: Any - def __init__(self, default_timeout=300): ... + default_timeout: float + def __init__(self, default_timeout: float = ...): ... def get(self, key): ... def delete(self, key): ... def get_many(self, *keys): ... def get_dict(self, *keys): ... - def set(self, key, value, timeout=None): ... - def add(self, key, value, timeout=None): ... - def set_many(self, mapping, timeout=None): ... + def set(self, key, value, timeout: Optional[float] = ...): ... + def add(self, key, value, timeout: Optional[float] = ...): ... + def set_many(self, mapping, timeout: Optional[float] = ...): ... def delete_many(self, *keys): ... def has(self, key): ... def clear(self): ... - def inc(self, key, delta=1): ... - def dec(self, key, delta=1): ... + def inc(self, key, delta=...): ... + def dec(self, key, delta=...): ... class NullCache(BaseCache): ... class SimpleCache(BaseCache): clear = ... # type: Any - def __init__(self, threshold=500, default_timeout=300): ... + def __init__(self, threshold: int = ..., default_timeout: float = ...): ... def get(self, key): ... - def set(self, key, value, timeout=None): ... - def add(self, key, value, timeout=None): ... + def set(self, key, value, timeout: Optional[float] = ...): ... + def add(self, key, value, timeout: Optional[float] = ...): ... def delete(self, key): ... def has(self, key): ... class MemcachedCache(BaseCache): key_prefix = ... # type: Any - def __init__(self, servers=None, default_timeout=300, key_prefix=None): ... + def __init__(self, servers: Optional[Any] = ..., default_timeout: float = ..., key_prefix: Optional[Any] = ...): ... def get(self, key): ... def get_dict(self, *keys): ... - def add(self, key, value, timeout=None): ... - def set(self, key, value, timeout=None): ... + def add(self, key, value, timeout: Optional[float] = ...): ... + def set(self, key, value, timeout: Optional[float] = ...): ... def get_many(self, *keys): ... - def set_many(self, mapping, timeout=None): ... + def set_many(self, mapping, timeout: Optional[float] = ...): ... def delete(self, key): ... def delete_many(self, *keys): ... def has(self, key): ... def clear(self): ... - def inc(self, key, delta=1): ... - def dec(self, key, delta=1): ... + def inc(self, key, delta=...): ... + def dec(self, key, delta=...): ... def import_preferred_memcache_lib(self, servers): ... GAEMemcachedCache = ... # type: Any class RedisCache(BaseCache): key_prefix = ... # type: Any - def __init__(self, host='', port=6379, password=None, db=0, default_timeout=300, key_prefix=None, **kwargs): ... + def __init__(self, host: str = ..., port: int = ..., password: Optional[Any] = ..., db: int = ..., + default_timeout: float = ..., key_prefix: Optional[Any] = ..., **kwargs): ... def dump_object(self, value): ... def load_object(self, value): ... def get(self, key): ... def get_many(self, *keys): ... - def set(self, key, value, timeout=None): ... - def add(self, key, value, timeout=None): ... - def set_many(self, mapping, timeout=None): ... + def set(self, key, value, timeout: Optional[float] = ...): ... + def add(self, key, value, timeout: Optional[float] = ...): ... + def set_many(self, mapping, timeout: Optional[float] = ...): ... def delete(self, key): ... def delete_many(self, *keys): ... def has(self, key): ... def clear(self): ... - def inc(self, key, delta=1): ... - def dec(self, key, delta=1): ... + def inc(self, key, delta=...): ... + def dec(self, key, delta=...): ... class FileSystemCache(BaseCache): - def __init__(self, cache_dir, threshold=500, default_timeout=300, mode=384): ... + def __init__(self, cache_dir, threshold: int = ..., default_timeout: float = ..., mode: int = ...): ... def clear(self): ... def get(self, key): ... - def add(self, key, value, timeout=None): ... - def set(self, key, value, timeout=None): ... + def add(self, key, value, timeout: Optional[float] = ...): ... + def set(self, key, value, timeout: Optional[float] = ...): ... def delete(self, key): ... def has(self, key): ... class UWSGICache(BaseCache): cache = ... # type: Any - def __init__(self, default_timeout=300, cache=''): ... + def __init__(self, default_timeout: float = ..., cache: str = ...): ... def get(self, key): ... def delete(self, key): ... - def set(self, key, value, timeout=None): ... - def add(self, key, value, timeout=None): ... + def set(self, key, value, timeout: Optional[float] = ...): ... + def add(self, key, value, timeout: Optional[float] = ...): ... def clear(self): ... def has(self, key): ... diff --git a/third_party/2and3/werkzeug/contrib/fixers.pyi b/third_party/2and3/werkzeug/contrib/fixers.pyi index cbb31f377..0d1dbb4c0 100644 --- a/third_party/2and3/werkzeug/contrib/fixers.pyi +++ b/third_party/2and3/werkzeug/contrib/fixers.pyi @@ -4,7 +4,7 @@ from wsgiref.types import WSGIApplication, WSGIEnvironment, StartResponse class CGIRootFix: app = ... # type: Any app_root = ... # type: Any - def __init__(self, app, app_root=''): ... + def __init__(self, app, app_root: str = ...): ... def __call__(self, environ, start_response): ... LighttpdCGIRootFix = ... # type: Any @@ -25,14 +25,14 @@ class HeaderRewriterFix: app = ... # type: Any remove_headers = ... # type: Any add_headers = ... # type: Any - def __init__(self, app, remove_headers=None, add_headers=None): ... + def __init__(self, app, remove_headers: Optional[Any] = ..., add_headers: Optional[Any] = ...): ... def __call__(self, environ, start_response): ... class InternetExplorerFix: app = ... # type: Any fix_vary = ... # type: Any fix_attach = ... # type: Any - def __init__(self, app, fix_vary=True, fix_attach=True): ... - def fix_headers(self, environ, headers, status=None): ... + def __init__(self, app, fix_vary: bool = ..., fix_attach: bool = ...): ... + def fix_headers(self, environ, headers, status: Optional[Any] = ...): ... def run_fixed(self, environ, start_response): ... def __call__(self, environ, start_response): ... diff --git a/third_party/2and3/werkzeug/contrib/iterio.pyi b/third_party/2and3/werkzeug/contrib/iterio.pyi index 33da95600..668cc8916 100644 --- a/third_party/2and3/werkzeug/contrib/iterio.pyi +++ b/third_party/2and3/werkzeug/contrib/iterio.pyi @@ -1,24 +1,25 @@ -from typing import Any +from typing import Any, Optional, Text, Union greenlet = ... # type: Any class IterIO: - def __new__(cls, obj, sentinel=''): ... + def __new__(cls, obj, sentinel: Union[Text, bytes] = ...): ... def __iter__(self): ... def tell(self): ... def isatty(self): ... - def seek(self, pos, mode=0): ... - def truncate(self, size=None): ... + def seek(self, pos, mode: int = ...): ... + def truncate(self, size: Optional[Any] = ...): ... def write(self, s): ... def writelines(self, list): ... - def read(self, n=-1): ... - def readlines(self, sizehint=0): ... - def readline(self, length=None): ... + def read(self, n: int = ...): ... + def readlines(self, sizehint: int = ...): ... + def readline(self, length: Optional[Any] = ...): ... def flush(self): ... def __next__(self): ... class IterI(IterIO): - def __new__(cls, func, sentinel=''): ... + sentinel: Any + def __new__(cls, func, sentinel: Union[Text, bytes] = ...): ... closed = ... # type: Any def close(self): ... def write(self, s): ... @@ -26,13 +27,13 @@ class IterI(IterIO): def flush(self): ... class IterO(IterIO): - sentinel = ... # type: Any + sentinel: Any closed = ... # type: Any pos = ... # type: Any - def __new__(cls, gen, sentinel=''): ... + def __new__(cls, gen, sentinel: Union[Text, bytes] = ...): ... def __iter__(self): ... def close(self): ... - def seek(self, pos, mode=0): ... - def read(self, n=-1): ... - def readline(self, length=None): ... - def readlines(self, sizehint=0): ... + def seek(self, pos, mode: int = ...): ... + def read(self, n: int = ...): ... + def readline(self, length: Optional[Any] = ...): ... + def readlines(self, sizehint: int = ...): ... diff --git a/third_party/2and3/werkzeug/contrib/jsrouting.pyi b/third_party/2and3/werkzeug/contrib/jsrouting.pyi index a9cc8c2a1..6d9c18891 100644 --- a/third_party/2and3/werkzeug/contrib/jsrouting.pyi +++ b/third_party/2and3/werkzeug/contrib/jsrouting.pyi @@ -2,8 +2,8 @@ from typing import Any def dumps(*args): ... def render_template(name_parts, rules, converters): ... -def generate_map(map, name=''): ... -def generate_adapter(adapter, name='', map_name=''): ... +def generate_map(map, name: str = ...): ... +def generate_adapter(adapter, name: str = ..., map_name: str = ...): ... def js_to_url_function(converter): ... def NumberConverter_js_to_url(conv): ... diff --git a/third_party/2and3/werkzeug/contrib/lint.pyi b/third_party/2and3/werkzeug/contrib/lint.pyi index f89c12092..0ff09bb57 100644 --- a/third_party/2and3/werkzeug/contrib/lint.pyi +++ b/third_party/2and3/werkzeug/contrib/lint.pyi @@ -3,7 +3,7 @@ from typing import Any class WSGIWarning(Warning): ... class HTTPWarning(Warning): ... -def check_string(context, obj, stacklevel=3): ... +def check_string(context, obj, stacklevel: int = ...): ... class InputStream: def __init__(self, stream): ... diff --git a/third_party/2and3/werkzeug/contrib/profiler.pyi b/third_party/2and3/werkzeug/contrib/profiler.pyi index db1eacbf6..56ddaba60 100644 --- a/third_party/2and3/werkzeug/contrib/profiler.pyi +++ b/third_party/2and3/werkzeug/contrib/profiler.pyi @@ -1,4 +1,4 @@ -from typing import Any +from typing import Any, Optional available = ... # type: Any @@ -8,7 +8,8 @@ class MergeStream: def write(self, data): ... class ProfilerMiddleware: - def __init__(self, app, stream=None, sort_by=..., restrictions=..., profile_dir=None): ... + def __init__(self, app, stream: Optional[Any] = ..., sort_by=..., restrictions=..., profile_dir: Optional[Any] = ...): ... def __call__(self, environ, start_response): ... -def make_action(app_factory, hostname='', port=5000, threaded=False, processes=1, stream=None, sort_by=..., restrictions=...): ... +def make_action(app_factory, hostname: str = ..., port: int = ..., threaded: bool = ..., processes: int = ..., + stream: Optional[Any] = ..., sort_by=..., restrictions=...): ... diff --git a/third_party/2and3/werkzeug/contrib/securecookie.pyi b/third_party/2and3/werkzeug/contrib/securecookie.pyi index 219356f64..6605a575d 100644 --- a/third_party/2and3/werkzeug/contrib/securecookie.pyi +++ b/third_party/2and3/werkzeug/contrib/securecookie.pyi @@ -1,4 +1,4 @@ -from typing import Any +from typing import Any, Optional from hmac import new as hmac from hashlib import sha1 as _default_hash from werkzeug.contrib.sessions import ModificationTrackingDict @@ -11,16 +11,18 @@ class SecureCookie(ModificationTrackingDict): quote_base64 = ... # type: Any secret_key = ... # type: Any new = ... # type: Any - def __init__(self, data=None, secret_key=None, new=True): ... + def __init__(self, data: Optional[Any] = ..., secret_key: Optional[Any] = ..., new: bool = ...): ... @property def should_save(self): ... @classmethod def quote(cls, value): ... @classmethod def unquote(cls, value): ... - def serialize(self, expires=None): ... + def serialize(self, expires: Optional[Any] = ...): ... @classmethod def unserialize(cls, string, secret_key): ... @classmethod - def load_cookie(cls, request, key='', secret_key=None): ... - def save_cookie(self, response, key='', expires=None, session_expires=None, max_age=None, path='', domain=None, secure=None, httponly=False, force=False): ... + def load_cookie(cls, request, key: str = ..., secret_key: Optional[Any] = ...): ... + def save_cookie(self, response, key: str = ..., expires: Optional[Any] = ..., session_expires: Optional[Any] = ..., + max_age: Optional[Any] = ..., path: str = ..., domain: Optional[Any] = ..., secure: Optional[Any] = ..., + httponly: bool = ..., force: bool = ...): ... diff --git a/third_party/2and3/werkzeug/contrib/sessions.pyi b/third_party/2and3/werkzeug/contrib/sessions.pyi index aa3f8fc27..3a825777f 100644 --- a/third_party/2and3/werkzeug/contrib/sessions.pyi +++ b/third_party/2and3/werkzeug/contrib/sessions.pyi @@ -1,7 +1,7 @@ -from typing import Any +from typing import Any, Optional, Text from werkzeug.datastructures import CallbackDict -def generate_key(salt=None): ... +def generate_key(salt: Optional[Any] = ...): ... class ModificationTrackingDict(CallbackDict): modified = ... # type: Any @@ -12,15 +12,15 @@ class ModificationTrackingDict(CallbackDict): class Session(ModificationTrackingDict): sid = ... # type: Any new = ... # type: Any - def __init__(self, data, sid, new=False): ... + def __init__(self, data, sid, new: bool = ...): ... @property def should_save(self): ... class SessionStore: session_class = ... # type: Any - def __init__(self, session_class=None): ... + def __init__(self, session_class: Optional[Any] = ...): ... def is_valid_key(self, key): ... - def generate_key(self, salt=None): ... + def generate_key(self, salt: Optional[Any] = ...): ... def new(self): ... def save(self, session): ... def save_if_modified(self, session): ... @@ -29,10 +29,11 @@ class SessionStore: class FilesystemSessionStore(SessionStore): path = ... # type: Any - filename_template = ... # type: Any + filename_template: str renew_missing = ... # type: Any mode = ... # type: Any - def __init__(self, path=None, filename_template='', session_class=None, renew_missing=False, mode=420): ... + def __init__(self, path: Optional[Any] = ..., filename_template: Text = ..., session_class: Optional[Any] = ..., + renew_missing: bool = ..., mode: int = ...): ... def get_session_filename(self, sid): ... def save(self, session): ... def delete(self, session): ... @@ -50,5 +51,7 @@ class SessionMiddleware: cookie_secure = ... # type: Any cookie_httponly = ... # type: Any environ_key = ... # type: Any - def __init__(self, app, store, cookie_name='', cookie_age=None, cookie_expires=None, cookie_path='', cookie_domain=None, cookie_secure=None, cookie_httponly=False, environ_key=''): ... + def __init__(self, app, store, cookie_name: str = ..., cookie_age: Optional[Any] = ..., cookie_expires: Optional[Any] = ..., + cookie_path: str = ..., cookie_domain: Optional[Any] = ..., cookie_secure: Optional[Any] = ..., + cookie_httponly: bool = ..., environ_key: str = ...): ... def __call__(self, environ, start_response): ... diff --git a/third_party/2and3/werkzeug/datastructures.pyi b/third_party/2and3/werkzeug/datastructures.pyi index f031369e2..d5df360a6 100644 --- a/third_party/2and3/werkzeug/datastructures.pyi +++ b/third_party/2and3/werkzeug/datastructures.pyi @@ -1,5 +1,5 @@ import collections -from typing import Any, Optional, Mapping, Dict, TypeVar, Callable, Union, overload +from typing import Any, Optional, Mapping, Dict, TypeVar, Callable, Union, overload, Text from collections import Container, Iterable, MutableSet _K = TypeVar("_K") @@ -24,9 +24,9 @@ class ImmutableListMixin: remove = ... # type: Any def extend(self, iterable): ... def insert(self, pos, value): ... - def pop(self, index=-1): ... + def pop(self, index: int = ...): ... def reverse(self): ... - def sort(self, cmp=None, key=None, reverse=None): ... + def sort(self, cmp: Optional[Any] = ..., key: Optional[Any] = ..., reverse: Optional[Any] = ...): ... class ImmutableList(ImmutableListMixin, list): ... @@ -35,9 +35,9 @@ class ImmutableDictMixin: def fromkeys(cls, *args, **kwargs): ... def __reduce_ex__(self, protocol): ... def __hash__(self): ... - def setdefault(self, key, default=None): ... + def setdefault(self, key, default: Optional[Any] = ...): ... def update(self, *args, **kwargs): ... - def pop(self, key, default=None): ... + def pop(self, key, default: Optional[Any] = ...): ... def popitem(self): ... def __setitem__(self, key, value): ... def __delitem__(self, key): ... @@ -49,11 +49,11 @@ class ImmutableMultiDictMixin(ImmutableDictMixin): def popitemlist(self): ... def poplist(self, key): ... def setlist(self, key, new_list): ... - def setlistdefault(self, key, default_list=None): ... + def setlistdefault(self, key, default_list: Optional[Any] = ...): ... class UpdateDictMixin: on_update = ... # type: Any - def setdefault(self, key, default=None): ... + def setdefault(self, key, default: Optional[Any] = ...): ... def pop(self, key, default=...): ... __setitem__ = ... # type: Any __delitem__ = ... # type: Any @@ -80,23 +80,23 @@ class ViewItems: def __iter__(self): ... class MultiDict(TypeConversionDict): - def __init__(self, mapping=None): ... + def __init__(self, mapping: Optional[Any] = ...): ... def __getitem__(self, key): ... def __setitem__(self, key, value): ... def add(self, key, value): ... - def getlist(self, key, type=None): ... + def getlist(self, key, type: Optional[Any] = ...): ... def setlist(self, key, new_list): ... - def setdefault(self, key, default=None): ... - def setlistdefault(self, key, default_list=None): ... - def items(self, multi=False): ... + def setdefault(self, key, default: Optional[Any] = ...): ... + def setlistdefault(self, key, default_list: Optional[Any] = ...): ... + def items(self, multi: bool = ...): ... def lists(self): ... def keys(self): ... __iter__ = ... # type: Any def values(self): ... def listvalues(self): ... def copy(self): ... - def deepcopy(self, memo=None): ... - def to_dict(self, flat=True): ... + def deepcopy(self, memo: Optional[Any] = ...): ... + def to_dict(self, flat: bool = ...): ... def update(self, other_dict): ... def pop(self, key, default=...): ... def popitem(self): ... @@ -114,7 +114,7 @@ class _omd_bucket: def unlink(self, omd): ... class OrderedMultiDict(MultiDict): - def __init__(self, mapping=None): ... + def __init__(self, mapping: Optional[Any] = ...): ... def __eq__(self, other): ... def __ne__(self, other): ... def __reduce_ex__(self, protocol): ... @@ -124,13 +124,13 @@ class OrderedMultiDict(MultiDict): def keys(self): ... __iter__ = ... # type: Any def values(self): ... - def items(self, multi=False): ... + def items(self, multi: bool = ...): ... def lists(self): ... def listvalues(self): ... def add(self, key, value): ... - def getlist(self, key, type=None): ... + def getlist(self, key, type: Optional[Any] = ...): ... def setlist(self, key, new_list): ... - def setlistdefault(self, key, default_list=None): ... + def setlistdefault(self, key, default_list: Optional[Any] = ...): ... def update(self, mapping): ... def poplist(self, key): ... def pop(self, key, default=...): ... @@ -138,8 +138,8 @@ class OrderedMultiDict(MultiDict): def popitemlist(self): ... class Headers(collections.Mapping): - def __init__(self, defaults=None): ... - def __getitem__(self, key, _get_mode=False): ... + def __init__(self, defaults: Optional[Any] = ...): ... + def __getitem__(self, key, _get_mode: bool = ...): ... def __eq__(self, other): ... def __ne__(self, other): ... @overload @@ -160,10 +160,10 @@ class Headers(collections.Mapping): def get(self, key: str, default: Any, type: None, as_bytes: bool) -> Any: ... @overload def get(self, key: str, default: _D, type: Callable[[Any], _R], as_bytes: bool) -> Union[_R, _D]: ... - def getlist(self, key, type=None, as_bytes=False): ... + def getlist(self, key, type: Optional[Any] = ..., as_bytes: bool = ...): ... def get_all(self, name): ... - def items(self, lower=False): ... - def keys(self, lower=False): ... + def items(self, lower: bool = ...): ... + def keys(self, lower: bool = ...): ... def values(self): ... def extend(self, iterable): ... def __delitem__(self, key: Any) -> None: ... @@ -180,7 +180,7 @@ class Headers(collections.Mapping): def set(self, _key, _value, **kw): ... def setdefault(self, key, value): ... def __setitem__(self, key, value): ... - def to_list(self, charset=''): ... + def to_list(self, charset: Text = ...): ... def to_wsgi_list(self): ... def copy(self): ... def __copy__(self): ... @@ -202,7 +202,7 @@ class EnvironHeaders(ImmutableHeadersMixin, Headers): environ = ... # type: Any def __init__(self, environ): ... def __eq__(self, other): ... - def __getitem__(self, key, _get_mode=False): ... + def __getitem__(self, key, _get_mode: bool = ...): ... def __len__(self): ... def __iter__(self): ... def copy(self): ... @@ -210,26 +210,26 @@ class EnvironHeaders(ImmutableHeadersMixin, Headers): class CombinedMultiDict(ImmutableMultiDictMixin, MultiDict): def __reduce_ex__(self, protocol): ... dicts = ... # type: Any - def __init__(self, dicts=None): ... + def __init__(self, dicts: Optional[Any] = ...): ... @classmethod def fromkeys(cls): ... def __getitem__(self, key): ... - def get(self, key, default=None, type=None): ... - def getlist(self, key, type=None): ... + def get(self, key, default: Optional[Any] = ..., type: Optional[Any] = ...): ... + def getlist(self, key, type: Optional[Any] = ...): ... def keys(self): ... __iter__ = ... # type: Any - def items(self, multi=False): ... + def items(self, multi: bool = ...): ... def values(self): ... def lists(self): ... def listvalues(self): ... def copy(self): ... - def to_dict(self, flat=True): ... + def to_dict(self, flat: bool = ...): ... def __len__(self): ... def __contains__(self, key): ... has_key = ... # type: Any class FileMultiDict(MultiDict): - def add_file(self, name, file, filename=None, content_type=None): ... + def add_file(self, name, file, filename: Optional[Any] = ..., content_type: Optional[Any] = ...): ... class ImmutableDict(ImmutableDictMixin, dict): def copy(self): ... @@ -253,7 +253,7 @@ class Accept(ImmutableList): def find(self, key): ... def values(self): ... def to_header(self): ... - def best_match(self, matches, default=None): ... + def best_match(self, matches, default: Optional[Any] = ...): ... @property def best(self): ... @@ -277,7 +277,7 @@ class _CacheControl(UpdateDictMixin, dict): no_transform = ... # type: Any on_update = ... # type: Any provided = ... # type: Any - def __init__(self, values=..., on_update=None): ... + def __init__(self, values=..., on_update: Optional[Any] = ...): ... def to_header(self): ... class RequestCacheControl(ImmutableDictMixin, _CacheControl): @@ -295,11 +295,11 @@ class ResponseCacheControl(_CacheControl): class CallbackDict(UpdateDictMixin, dict): on_update = ... # type: Any - def __init__(self, initial=None, on_update=None): ... + def __init__(self, initial: Optional[Any] = ..., on_update: Optional[Any] = ...): ... class HeaderSet(MutableSet): on_update = ... # type: Any - def __init__(self, headers=None, on_update=None): ... + def __init__(self, headers: Optional[Any] = ..., on_update: Optional[Any] = ...): ... def add(self, header): ... def remove(self, header): ... def update(self, iterable): ... @@ -307,7 +307,7 @@ class HeaderSet(MutableSet): def find(self, header): ... def index(self, header): ... def clear(self): ... - def as_set(self, preserve_casing=False): ... + def as_set(self, preserve_casing: bool = ...): ... def to_header(self): ... def __getitem__(self, idx): ... def __delitem__(self, idx): ... @@ -319,14 +319,14 @@ class HeaderSet(MutableSet): class ETags(Container, Iterable): star_tag = ... # type: Any - def __init__(self, strong_etags=None, weak_etags=None, star_tag=False): ... - def as_set(self, include_weak=False): ... + def __init__(self, strong_etags: Optional[Any] = ..., weak_etags: Optional[Any] = ..., star_tag: bool = ...): ... + def as_set(self, include_weak: bool = ...): ... def is_weak(self, etag): ... def contains_weak(self, etag): ... def contains(self, etag): ... def contains_raw(self, etag): ... def to_header(self): ... - def __call__(self, etag=None, data=None, include_weak=False): ... + def __call__(self, etag: Optional[Any] = ..., data: Optional[Any] = ..., include_weak: bool = ...): ... def __bool__(self): ... __nonzero__ = ... # type: Any def __iter__(self): ... @@ -335,7 +335,7 @@ class ETags(Container, Iterable): class IfRange: etag = ... # type: Any date = ... # type: Any - def __init__(self, etag=None, date=None): ... + def __init__(self, etag: Optional[Any] = ..., date: Optional[Any] = ...): ... def to_header(self): ... class Range: @@ -349,13 +349,13 @@ class Range: class ContentRange: on_update = ... # type: Any - def __init__(self, units, start, stop, length=None, on_update=None): ... - units = ... # type: Any + units: Optional[str] start = ... # type: Any stop = ... # type: Any length = ... # type: Any - def set(self, start, stop, length=None, units=''): ... - def unset(self): ... + def __init__(self, units: Optional[str], start, stop, length: Optional[Any] = ..., on_update: Optional[Any] = ...): ... + def set(self, start, stop, length: Optional[Any] = ..., units: Optional[str] = ...): ... + def unset(self) -> None: ... def to_header(self): ... def __nonzero__(self): ... __bool__ = ... # type: Any @@ -386,12 +386,13 @@ class Authorization(ImmutableDictMixin, Dict[str, Any]): class WWWAuthenticate(UpdateDictMixin, dict): on_update = ... # type: Any - def __init__(self, auth_type=None, values=None, on_update=None): ... - def set_basic(self, realm=''): ... - def set_digest(self, realm, nonce, qop=..., opaque=None, algorithm=None, stale=False): ... + def __init__(self, auth_type: Optional[Any] = ..., values: Optional[Any] = ..., on_update: Optional[Any] = ...): ... + def set_basic(self, realm: str = ...): ... + def set_digest(self, realm, nonce, qop=..., opaque: Optional[Any] = ..., algorithm: Optional[Any] = ..., + stale: bool = ...): ... def to_header(self): ... @staticmethod - def auth_property(name, doc=None): ... + def auth_property(name, doc: Optional[Any] = ...): ... type = ... # type: Any realm = ... # type: Any domain = ... # type: Any @@ -406,7 +407,8 @@ class FileStorage: stream = ... # type: Any filename = ... # type: Any headers = ... # type: Any - def __init__(self, stream=None, filename=None, name=None, content_type=None, content_length=None, headers=None): ... + def __init__(self, stream: Optional[Any] = ..., filename: Optional[Any] = ..., name: Optional[Any] = ..., + content_type: Optional[Any] = ..., content_length: Optional[Any] = ..., headers: Optional[Any] = ...): ... @property def content_type(self): ... @property @@ -415,7 +417,7 @@ class FileStorage: def mimetype(self): ... @property def mimetype_params(self): ... - def save(self, dst, buffer_size=16384): ... + def save(self, dst, buffer_size: int = ...): ... def close(self): ... def __nonzero__(self): ... __bool__ = ... # type: Any diff --git a/third_party/2and3/werkzeug/debug/__init__.pyi b/third_party/2and3/werkzeug/debug/__init__.pyi index 0c949f91d..32cf61c50 100644 --- a/third_party/2and3/werkzeug/debug/__init__.pyi +++ b/third_party/2and3/werkzeug/debug/__init__.pyi @@ -1,4 +1,4 @@ -from typing import Any +from typing import Any, Optional from werkzeug.wrappers import BaseRequest as Request, BaseResponse as Response PIN_TIME = ... # type: Any @@ -25,7 +25,9 @@ class DebuggedApplication: secret = ... # type: Any pin_logging = ... # type: Any pin = ... # type: Any - def __init__(self, app, evalex=False, request_key='', console_path='', console_init_func=None, show_hidden_frames=False, lodgeit_url=None, pin_security=True, pin_logging=True): ... + def __init__(self, app, evalex: bool = ..., request_key: str = ..., console_path: str = ..., + console_init_func: Optional[Any] = ..., show_hidden_frames: bool = ..., lodgeit_url: Optional[Any] = ..., + pin_security: bool = ..., pin_logging: bool = ...): ... @property def pin_cookie_name(self): ... def debug_application(self, environ, start_response): ... diff --git a/third_party/2and3/werkzeug/debug/console.pyi b/third_party/2and3/werkzeug/debug/console.pyi index 5046a519c..efeecce51 100644 --- a/third_party/2and3/werkzeug/debug/console.pyi +++ b/third_party/2and3/werkzeug/debug/console.pyi @@ -1,4 +1,4 @@ -from typing import Any +from typing import Any, Optional import code class HTMLStringO: @@ -6,7 +6,7 @@ class HTMLStringO: def isatty(self): ... def close(self): ... def flush(self): ... - def seek(self, n, mode=0): ... + def seek(self, n, mode: int = ...): ... def readline(self): ... def reset(self): ... def write(self, x): ... @@ -36,9 +36,9 @@ class _InteractiveConsole(code.InteractiveInterpreter): def runsource(self, source): ... def runcode(self, code): ... def showtraceback(self): ... - def showsyntaxerror(self, filename=None): ... + def showsyntaxerror(self, filename: Optional[Any] = ...): ... def write(self, data): ... class Console: - def __init__(self, globals=None, locals=None): ... + def __init__(self, globals: Optional[Any] = ..., locals: Optional[Any] = ...): ... def eval(self, code): ... diff --git a/third_party/2and3/werkzeug/debug/repr.pyi b/third_party/2and3/werkzeug/debug/repr.pyi index fe3faef8e..2da0582d0 100644 --- a/third_party/2and3/werkzeug/debug/repr.pyi +++ b/third_party/2and3/werkzeug/debug/repr.pyi @@ -1,4 +1,4 @@ -from typing import Any +from typing import Any, Optional deque = ... # type: Any missing = ... # type: Any @@ -10,7 +10,7 @@ def debug_repr(obj): ... def dump(obj=...): ... class _Helper: - def __call__(self, topic=None): ... + def __call__(self, topic: Optional[Any] = ...): ... helper = ... # type: Any @@ -22,12 +22,12 @@ class DebugReprGenerator: frozenset_repr = ... # type: Any deque_repr = ... # type: Any def regex_repr(self, obj): ... - def string_repr(self, obj, limit=70): ... - def dict_repr(self, d, recursive, limit=5): ... + def string_repr(self, obj, limit: int = ...): ... + def dict_repr(self, d, recursive, limit: int = ...): ... def object_repr(self, obj): ... def dispatch_repr(self, obj, recursive): ... def fallback_repr(self): ... def repr(self, obj): ... def dump_object(self, obj): ... def dump_locals(self, d): ... - def render_object_dump(self, items, title, repr=None): ... + def render_object_dump(self, items, title, repr: Optional[Any] = ...): ... diff --git a/third_party/2and3/werkzeug/debug/tbtools.pyi b/third_party/2and3/werkzeug/debug/tbtools.pyi index 7c0cd584b..239d73783 100644 --- a/third_party/2and3/werkzeug/debug/tbtools.pyi +++ b/third_party/2and3/werkzeug/debug/tbtools.pyi @@ -1,4 +1,4 @@ -from typing import Any +from typing import Any, Optional UTF8_COOKIE = ... # type: Any system_exceptions = ... # type: Any @@ -10,8 +10,8 @@ SUMMARY_HTML = ... # type: Any FRAME_HTML = ... # type: Any SOURCE_LINE_HTML = ... # type: Any -def render_console_html(secret, evalex_trusted=True): ... -def get_current_traceback(ignore_system_exceptions=False, show_hidden_frames=False, skip=0): ... +def render_console_html(secret, evalex_trusted: bool = ...): ... +def get_current_traceback(ignore_system_exceptions: bool = ..., show_hidden_frames: bool = ..., skip: int = ...): ... class Line: lineno = ... # type: Any @@ -31,10 +31,10 @@ class Traceback: def filter_hidden_frames(self): ... def is_syntax_error(self): ... def exception(self): ... - def log(self, logfile=None): ... + def log(self, logfile: Optional[Any] = ...): ... def paste(self): ... - def render_summary(self, include_title=True): ... - def render_full(self, evalex=False, secret=None, evalex_trusted=True): ... + def render_summary(self, include_title: bool = ...): ... + def render_full(self, evalex: bool = ..., secret: Optional[Any] = ..., evalex_trusted: bool = ...): ... def generate_plaintext_traceback(self): ... def plaintext(self): ... id = ... # type: Any @@ -54,9 +54,9 @@ class Frame: def render(self): ... def render_line_context(self): ... def get_annotated_lines(self): ... - def eval(self, code, mode=''): ... + def eval(self, code, mode: str = ...): ... def sourcelines(self): ... - def get_context_lines(self, context=5): ... + def get_context_lines(self, context: int = ...): ... @property def current_line(self): ... def console(self): ... diff --git a/third_party/2and3/werkzeug/exceptions.pyi b/third_party/2and3/werkzeug/exceptions.pyi index 2529af9d2..9236e1541 100644 --- a/third_party/2and3/werkzeug/exceptions.pyi +++ b/third_party/2and3/werkzeug/exceptions.pyi @@ -48,7 +48,7 @@ class MethodNotAllowed(HTTPException): code = ... # type: int description = ... # type: str valid_methods = ... # type: Any - def __init__(self, valid_methods=None, description=None): ... + def __init__(self, valid_methods: Optional[Any] = ..., description: Optional[Any] = ...): ... def get_headers(self, environ): ... class NotAcceptable(HTTPException): @@ -91,8 +91,8 @@ class RequestedRangeNotSatisfiable(HTTPException): code = ... # type: int description = ... # type: str length = ... # type: Any - units = ... # type: Any - def __init__(self, length=None, units='', description=None): ... + units: str + def __init__(self, length: Optional[Any] = ..., units: str = ..., description: Optional[Any] = ...): ... def get_headers(self, environ): ... class ExpectationFailed(HTTPException): @@ -153,7 +153,7 @@ class HTTPVersionNotSupported(HTTPException): class Aborter: mapping = ... # type: Any - def __init__(self, mapping=None, extra=None) -> None: ... + def __init__(self, mapping: Optional[Any] = ..., extra: Optional[Any] = ...) -> None: ... def __call__(self, code: Union[int, Response], *args: Any, **kwargs: Any) -> NoReturn: ... def abort(status: Union[int, Response], *args: Any, **kwargs: Any) -> NoReturn: ... diff --git a/third_party/2and3/werkzeug/formparser.pyi b/third_party/2and3/werkzeug/formparser.pyi index 96c7f22dc..533697c8d 100644 --- a/third_party/2and3/werkzeug/formparser.pyi +++ b/third_party/2and3/werkzeug/formparser.pyi @@ -1,40 +1,45 @@ -from typing import Any +from typing import Any, Optional, Text -def default_stream_factory(total_content_length, filename, content_type, content_length=None): ... -def parse_form_data(environ, stream_factory=None, charset='', errors='', max_form_memory_size=None, max_content_length=None, cls=None, silent=True): ... +def default_stream_factory(total_content_length, filename, content_type, content_length: Optional[Any] = ...): ... +def parse_form_data(environ, stream_factory: Optional[Any] = ..., charset: Text = ..., errors: Text = ..., + max_form_memory_size: Optional[Any] = ..., max_content_length: Optional[Any] = ..., + cls: Optional[Any] = ..., silent: bool = ...): ... def exhaust_stream(f): ... class FormDataParser: stream_factory = ... # type: Any - charset = ... # type: Any - errors = ... # type: Any + charset: Text + errors: Text max_form_memory_size = ... # type: Any max_content_length = ... # type: Any cls = ... # type: Any silent = ... # type: Any - def __init__(self, stream_factory=None, charset='', errors='', max_form_memory_size=None, max_content_length=None, cls=None, silent=True): ... + def __init__(self, stream_factory: Optional[Any] = ..., charset: Text = ..., errors: Text = ..., + max_form_memory_size: Optional[Any] = ..., max_content_length: Optional[Any] = ..., cls: Optional[Any] = ..., + silent: bool = ...): ... def get_parse_func(self, mimetype, options): ... def parse_from_environ(self, environ): ... - def parse(self, stream, mimetype, content_length, options=None): ... + def parse(self, stream, mimetype, content_length, options: Optional[Any] = ...): ... parse_functions = ... # type: Any def is_valid_multipart_boundary(boundary): ... def parse_multipart_headers(iterable): ... class MultiPartParser: - charset = ... # type: Any - errors = ... # type: Any + charset: Text + errors: Text max_form_memory_size = ... # type: Any stream_factory = ... # type: Any cls = ... # type: Any buffer_size = ... # type: Any - def __init__(self, stream_factory=None, charset='', errors='', max_form_memory_size=None, cls=None, buffer_size=...): ... + def __init__(self, stream_factory: Optional[Any] = ..., charset: Text = ..., errors: Text = ..., + max_form_memory_size: Optional[Any] = ..., cls: Optional[Any] = ..., buffer_size=...): ... def fail(self, message): ... def get_part_encoding(self, headers): ... - def get_part_charset(self, headers): ... + def get_part_charset(self, headers) -> Text: ... def start_file_streaming(self, filename, headers, total_content_length): ... def in_memory_threshold_reached(self, bytes): ... def validate_boundary(self, boundary): ... - def parse_lines(self, file, boundary, content_length, cap_at_buffer=True): ... + def parse_lines(self, file, boundary, content_length, cap_at_buffer: bool = ...): ... def parse_parts(self, file, boundary, content_length): ... def parse(self, file, boundary, content_length): ... diff --git a/third_party/2and3/werkzeug/local.pyi b/third_party/2and3/werkzeug/local.pyi index f1d167ac7..b2e8d82e1 100644 --- a/third_party/2and3/werkzeug/local.pyi +++ b/third_party/2and3/werkzeug/local.pyi @@ -1,4 +1,4 @@ -from typing import Any +from typing import Any, Optional def release_local(local): ... @@ -26,14 +26,14 @@ class LocalStack: class LocalManager: locals = ... # type: Any ident_func = ... # type: Any - def __init__(self, locals=None, ident_func=None): ... + def __init__(self, locals: Optional[Any] = ..., ident_func: Optional[Any] = ...): ... def get_ident(self): ... def cleanup(self): ... def make_middleware(self, app): ... def middleware(self, func): ... class LocalProxy: - def __init__(self, local, name=None): ... + def __init__(self, local, name: Optional[Any] = ...): ... @property def __dict__(self): ... def __bool__(self): ... diff --git a/third_party/2and3/werkzeug/routing.pyi b/third_party/2and3/werkzeug/routing.pyi index 3d80624d8..571d20aff 100644 --- a/third_party/2and3/werkzeug/routing.pyi +++ b/third_party/2and3/werkzeug/routing.pyi @@ -1,4 +1,4 @@ -from typing import Any, Optional +from typing import Any, Optional, Text from werkzeug.exceptions import HTTPException def parse_converter_args(argstr): ... @@ -76,18 +76,20 @@ class Rule(RuleFactory): endpoint = ... # type: Any redirect_to = ... # type: Any arguments = ... # type: Any - def __init__(self, string, defaults=None, subdomain=None, methods=None, build_only=False, endpoint=None, strict_slashes=None, redirect_to=None, alias=False, host=None): ... + def __init__(self, string, defaults: Optional[Any] = ..., subdomain: Optional[Any] = ..., methods: Optional[Any] = ..., + build_only: bool = ..., endpoint: Optional[Any] = ..., strict_slashes: Optional[Any] = ..., + redirect_to: Optional[Any] = ..., alias: bool = ..., host: Optional[Any] = ...): ... def empty(self): ... def get_empty_kwargs(self): ... def get_rules(self, map): ... def refresh(self): ... - def bind(self, map, rebind=False): ... + def bind(self, map, rebind: bool = ...): ... def get_converter(self, variable_name, converter_name, args, kwargs): ... def compile(self): ... - def match(self, path, method=None): ... - def build(self, values, append_unknown=True): ... + def match(self, path, method: Optional[Any] = ...): ... + def build(self, values, append_unknown: bool = ...): ... def provides_defaults_for(self, rule): ... - def suitable_for(self, values, method=None): ... + def suitable_for(self, values, method: Optional[Any] = ...): ... def match_compare_key(self): ... def build_compare_key(self): ... def __eq__(self, other): ... @@ -103,7 +105,7 @@ class BaseConverter: class UnicodeConverter(BaseConverter): regex = ... # type: Any - def __init__(self, map, minlength=1, maxlength=None, length=None): ... + def __init__(self, map, minlength: int = ..., maxlength: Optional[Any] = ..., length: Optional[Any] = ...): ... class AnyConverter(BaseConverter): regex = ... # type: Any @@ -118,7 +120,7 @@ class NumberConverter(BaseConverter): fixed_digits = ... # type: Any min = ... # type: Any max = ... # type: Any - def __init__(self, map, fixed_digits=0, min=None, max=None): ... + def __init__(self, map, fixed_digits: int = ..., min: Optional[Any] = ..., max: Optional[Any] = ...): ... def to_python(self, value): ... def to_url(self, value): ... @@ -129,7 +131,7 @@ class IntegerConverter(NumberConverter): class FloatConverter(NumberConverter): regex = ... # type: Any num_convert = ... # type: Any - def __init__(self, map, min=None, max=None): ... + def __init__(self, map, min: Optional[Any] = ..., max: Optional[Any] = ...): ... class UUIDConverter(BaseConverter): regex = ... # type: Any @@ -141,20 +143,24 @@ DEFAULT_CONVERTERS = ... # type: Any class Map: default_converters = ... # type: Any default_subdomain = ... # type: Any - charset = ... # type: Any - encoding_errors = ... # type: Any + charset: Text + encoding_errors: Text strict_slashes = ... # type: Any redirect_defaults = ... # type: Any host_matching = ... # type: Any converters = ... # type: Any sort_parameters = ... # type: Any sort_key = ... # type: Any - def __init__(self, rules=None, default_subdomain='', charset='', strict_slashes=True, redirect_defaults=True, converters=None, sort_parameters=False, sort_key=None, encoding_errors='', host_matching=False): ... + def __init__(self, rules: Optional[Any] = ..., default_subdomain: str = ..., charset: Text = ..., + strict_slashes: bool = ..., redirect_defaults: bool = ..., converters: Optional[Any] = ..., + sort_parameters: bool = ..., sort_key: Optional[Any] = ..., encoding_errors: Text = ..., + host_matching: bool = ...): ... def is_endpoint_expecting(self, endpoint, *arguments): ... - def iter_rules(self, endpoint=None): ... + def iter_rules(self, endpoint: Optional[Any] = ...): ... def add(self, rulefactory): ... - def bind(self, server_name, script_name=None, subdomain=None, url_scheme='', default_method='', path_info=None, query_args=None): ... - def bind_to_environ(self, environ, server_name=None, subdomain=None): ... + def bind(self, server_name, script_name: Optional[Any] = ..., subdomain: Optional[Any] = ..., url_scheme: str = ..., + default_method: str = ..., path_info: Optional[Any] = ..., query_args: Optional[Any] = ...): ... + def bind_to_environ(self, environ, server_name: Optional[Any] = ..., subdomain: Optional[Any] = ...): ... def update(self): ... class MapAdapter: @@ -166,14 +172,18 @@ class MapAdapter: path_info = ... # type: Any default_method = ... # type: Any query_args = ... # type: Any - def __init__(self, map, server_name, script_name, subdomain, url_scheme, path_info, default_method, query_args=None): ... - def dispatch(self, view_func, path_info=None, method=None, catch_http_exceptions=False): ... - def match(self, path_info=None, method=None, return_rule=False, query_args=None): ... - def test(self, path_info=None, method=None): ... - def allowed_methods(self, path_info=None): ... + def __init__(self, map, server_name, script_name, subdomain, url_scheme, path_info, default_method, + query_args: Optional[Any] = ...): ... + def dispatch(self, view_func, path_info: Optional[Any] = ..., method: Optional[Any] = ..., + catch_http_exceptions: bool = ...): ... + def match(self, path_info: Optional[Any] = ..., method: Optional[Any] = ..., return_rule: bool = ..., + query_args: Optional[Any] = ...): ... + def test(self, path_info: Optional[Any] = ..., method: Optional[Any] = ...): ... + def allowed_methods(self, path_info: Optional[Any] = ...): ... def get_host(self, domain_part): ... def get_default_redirect(self, rule, method, values, query_args): ... def encode_query_args(self, query_args): ... - def make_redirect_url(self, path_info, query_args=None, domain_part=None): ... + def make_redirect_url(self, path_info, query_args: Optional[Any] = ..., domain_part: Optional[Any] = ...): ... def make_alias_redirect_url(self, path, endpoint, values, method, query_args): ... - def build(self, endpoint, values=None, method=None, force_external=False, append_unknown=True): ... + def build(self, endpoint, values: Optional[Any] = ..., method: Optional[Any] = ..., force_external: bool = ..., + append_unknown: bool = ...): ... diff --git a/third_party/2and3/werkzeug/script.pyi b/third_party/2and3/werkzeug/script.pyi index 758378d3b..bc474094f 100644 --- a/third_party/2and3/werkzeug/script.pyi +++ b/third_party/2and3/werkzeug/script.pyi @@ -1,12 +1,14 @@ -from typing import Any +from typing import Any, Optional argument_types = ... # type: Any converters = ... # type: Any -def run(namespace=None, action_prefix='', args=None): ... -def fail(message, code=-1): ... +def run(namespace: Optional[Any] = ..., action_prefix: str = ..., args: Optional[Any] = ...): ... +def fail(message, code: int = ...): ... def find_actions(namespace, action_prefix): ... def print_usage(actions): ... def analyse_action(func): ... -def make_shell(init_func=None, banner=None, use_ipython=True): ... -def make_runserver(app_factory, hostname='', port=5000, use_reloader=False, use_debugger=False, use_evalex=True, threaded=False, processes=1, static_files=None, extra_files=None, ssl_context=None): ... +def make_shell(init_func: Optional[Any] = ..., banner: Optional[Any] = ..., use_ipython: bool = ...): ... +def make_runserver(app_factory, hostname: str = ..., port: int = ..., use_reloader: bool = ..., use_debugger: bool = ..., + use_evalex: bool = ..., threaded: bool = ..., processes: int = ..., static_files: Optional[Any] = ..., + extra_files: Optional[Any] = ..., ssl_context: Optional[Any] = ...): ... diff --git a/third_party/2and3/werkzeug/security.pyi b/third_party/2and3/werkzeug/security.pyi index dde9fe1df..a9db6b7c0 100644 --- a/third_party/2and3/werkzeug/security.pyi +++ b/third_party/2and3/werkzeug/security.pyi @@ -1,12 +1,12 @@ -from typing import Any +from typing import Any, Optional SALT_CHARS = ... # type: Any DEFAULT_PBKDF2_ITERATIONS = ... # type: Any -def pbkdf2_hex(data, salt, iterations=..., keylen=None, hashfunc=None): ... -def pbkdf2_bin(data, salt, iterations=..., keylen=None, hashfunc=None): ... +def pbkdf2_hex(data, salt, iterations=..., keylen: Optional[Any] = ..., hashfunc: Optional[Any] = ...): ... +def pbkdf2_bin(data, salt, iterations=..., keylen: Optional[Any] = ..., hashfunc: Optional[Any] = ...): ... def safe_str_cmp(a, b): ... def gen_salt(length): ... -def generate_password_hash(password, method='', salt_length=8): ... +def generate_password_hash(password, method: str = ..., salt_length: int = ...): ... def check_password_hash(pwhash, password): ... def safe_join(directory, filename): ... diff --git a/third_party/2and3/werkzeug/serving.pyi b/third_party/2and3/werkzeug/serving.pyi index 9ef8e0969..2d84b2838 100644 --- a/third_party/2and3/werkzeug/serving.pyi +++ b/third_party/2and3/werkzeug/serving.pyi @@ -1,5 +1,5 @@ import sys -from typing import Any +from typing import Any, Optional if sys.version_info < (3,): from SocketServer import ThreadingMixIn, ForkingMixIn @@ -24,31 +24,31 @@ class WSGIRequestHandler(BaseHTTPRequestHandler): def run_wsgi(self): ... def handle(self): ... def initiate_shutdown(self): ... - def connection_dropped(self, error, environ=None): ... + def connection_dropped(self, error, environ: Optional[Any] = ...): ... raw_requestline = ... # type: Any def handle_one_request(self): ... - def send_response(self, code, message=None): ... + def send_response(self, code, message: Optional[Any] = ...): ... def version_string(self): ... def address_string(self): ... def port_integer(self): ... - def log_request(self, code='', size=''): ... + def log_request(self, code: object = ..., size: object = ...) -> None: ... def log_error(self, *args): ... def log_message(self, format, *args): ... def log(self, type, message, *args): ... BaseRequestHandler = ... # type: Any -def generate_adhoc_ssl_pair(cn=None): ... -def make_ssl_devcert(base_path, host=None, cn=None): ... +def generate_adhoc_ssl_pair(cn: Optional[Any] = ...): ... +def make_ssl_devcert(base_path, host: Optional[Any] = ..., cn: Optional[Any] = ...): ... def generate_adhoc_ssl_context(): ... -def load_ssl_context(cert_file, pkey_file=None, protocol=None): ... +def load_ssl_context(cert_file, pkey_file: Optional[Any] = ..., protocol: Optional[Any] = ...): ... class _SSLContext: def __init__(self, protocol): ... - def load_cert_chain(self, certfile, keyfile=None, password=None): ... + def load_cert_chain(self, certfile, keyfile: Optional[Any] = ..., password: Optional[Any] = ...): ... def wrap_socket(self, sock, **kwargs): ... -def is_ssl_error(error=None): ... +def is_ssl_error(error: Optional[Any] = ...): ... def select_ip_version(host, port): ... class BaseWSGIServer(HTTPServer): @@ -64,7 +64,8 @@ class BaseWSGIServer(HTTPServer): socket = ... # type: Any server_address = ... # type: Any ssl_context = ... # type: Any - def __init__(self, host, port, app, handler=None, passthrough_errors=False, ssl_context=None, fd=None): ... + def __init__(self, host, port, app, handler: Optional[Any] = ..., passthrough_errors: bool = ..., + ssl_context: Optional[Any] = ..., fd: Optional[Any] = ...): ... def log(self, type, message, *args): ... def serve_forever(self): ... def handle_error(self, request, client_address): ... @@ -77,10 +78,16 @@ class ThreadedWSGIServer(ThreadingMixIn, BaseWSGIServer): class ForkingWSGIServer(ForkingMixIn, BaseWSGIServer): multiprocess = ... # type: Any max_children = ... # type: Any - def __init__(self, host, port, app, processes=40, handler=None, passthrough_errors=False, ssl_context=None, fd=None): ... + def __init__(self, host, port, app, processes: int = ..., handler: Optional[Any] = ..., passthrough_errors: bool = ..., + ssl_context: Optional[Any] = ..., fd: Optional[Any] = ...): ... -def make_server(host=None, port=None, app=None, threaded=False, processes=1, request_handler=None, passthrough_errors=False, ssl_context=None, fd=None): ... +def make_server(host: Optional[Any] = ..., port: Optional[Any] = ..., app: Optional[Any] = ..., threaded: bool = ..., + processes: int = ..., request_handler: Optional[Any] = ..., passthrough_errors: bool = ..., + ssl_context: Optional[Any] = ..., fd: Optional[Any] = ...): ... def is_running_from_reloader(): ... -def run_simple(hostname, port, application, use_reloader=False, use_debugger=False, use_evalex=True, extra_files=None, reloader_interval=1, reloader_type='', threaded=False, processes=1, request_handler=None, static_files=None, passthrough_errors=False, ssl_context=None): ... +def run_simple(hostname, port, application, use_reloader: bool = ..., use_debugger: bool = ..., use_evalex: bool = ..., + extra_files: Optional[Any] = ..., reloader_interval: int = ..., reloader_type: str = ..., threaded: bool = ..., + processes: int = ..., request_handler: Optional[Any] = ..., static_files: Optional[Any] = ..., + passthrough_errors: bool = ..., ssl_context: Optional[Any] = ...): ... def run_with_reloader(*args, **kwargs): ... def main(): ... diff --git a/third_party/2and3/werkzeug/test.pyi b/third_party/2and3/werkzeug/test.pyi index 4a8155181..72b0b54f8 100644 --- a/third_party/2and3/werkzeug/test.pyi +++ b/third_party/2and3/werkzeug/test.pyi @@ -1,5 +1,5 @@ import sys -from typing import Any +from typing import Any, Optional, Text if sys.version_info < (3,): from urllib2 import Request as U2Request @@ -8,15 +8,16 @@ else: from urllib.request import Request as U2Request from http.cookiejar import CookieJar -def stream_encode_multipart(values, use_tempfile=True, threshold=..., boundary=None, charset=''): ... -def encode_multipart(values, boundary=None, charset=''): ... -def File(fd, filename=None, mimetype=None): ... +def stream_encode_multipart(values, use_tempfile: int = ..., threshold=..., boundary: Optional[Any] = ..., + charset: Text = ...): ... +def encode_multipart(values, boundary: Optional[Any] = ..., charset: Text = ...): ... +def File(fd, filename: Optional[Any] = ..., mimetype: Optional[Any] = ...): ... class _TestCookieHeaders: headers = ... # type: Any def __init__(self, headers): ... def getheaders(self, name): ... - def get_all(self, name, default=None): ... + def get_all(self, name, default: Optional[Any] = ...): ... class _TestCookieResponse: headers = ... # type: Any @@ -31,7 +32,7 @@ class EnvironBuilder: server_protocol = ... # type: Any wsgi_version = ... # type: Any request_class = ... # type: Any - charset = ... # type: Any + charset: Text path = ... # type: Any base_url = ... # type: Any query_string = ... # type: Any @@ -48,7 +49,11 @@ class EnvironBuilder: input_stream = ... # type: Any content_length = ... # type: Any closed = ... # type: Any - def __init__(self, path='', base_url=None, query_string=None, method='', input_stream=None, content_type=None, content_length=None, errors_stream=None, multithread=False, multiprocess=False, run_once=False, headers=None, data=None, environ_base=None, environ_overrides=None, charset=''): ... + def __init__(self, path: str = ..., base_url: Optional[Any] = ..., query_string: Optional[Any] = ..., + method: str = ..., input_stream: Optional[Any] = ..., content_type: Optional[Any] = ..., + content_length: Optional[Any] = ..., errors_stream: Optional[Any] = ..., multithread: bool = ..., + multiprocess: bool = ..., run_once: bool = ..., headers: Optional[Any] = ..., data: Optional[Any] = ..., + environ_base: Optional[Any] = ..., environ_overrides: Optional[Any] = ..., charset: Text = ...): ... form = ... # type: Any files = ... # type: Any @property @@ -58,7 +63,7 @@ class EnvironBuilder: def __del__(self): ... def close(self): ... def get_environ(self): ... - def get_request(self, cls=None): ... + def get_request(self, cls: Optional[Any] = ...): ... class ClientRedirectError(Exception): ... @@ -67,11 +72,14 @@ class Client: response_wrapper = ... # type: Any cookie_jar = ... # type: Any allow_subdomain_redirects = ... # type: Any - def __init__(self, application, response_wrapper=None, use_cookies=True, allow_subdomain_redirects=False): ... - def set_cookie(self, server_name, key, value='', max_age=None, expires=None, path='', domain=None, secure=None, httponly=False, charset=''): ... - def delete_cookie(self, server_name, key, path='', domain=None): ... - def run_wsgi_app(self, environ, buffered=False): ... - def resolve_redirect(self, response, new_location, environ, buffered=False): ... + def __init__(self, application, response_wrapper: Optional[Any] = ..., use_cookies: bool = ..., + allow_subdomain_redirects: bool = ...): ... + def set_cookie(self, server_name, key, value: str = ..., max_age: Optional[Any] = ..., expires: Optional[Any] = ..., + path: str = ..., domain: Optional[Any] = ..., secure: Optional[Any] = ..., httponly: bool = ..., + charset: Text = ...): ... + def delete_cookie(self, server_name, key, path: str = ..., domain: Optional[Any] = ...): ... + def run_wsgi_app(self, environ, buffered: bool = ...): ... + def resolve_redirect(self, response, new_location, environ, buffered: bool = ...): ... def open(self, *args, **kwargs): ... def get(self, *args, **kw): ... def patch(self, *args, **kw): ... @@ -83,4 +91,4 @@ class Client: def trace(self, *args, **kw): ... def create_environ(*args, **kwargs): ... -def run_wsgi_app(app, environ, buffered=False): ... +def run_wsgi_app(app, environ, buffered: bool = ...): ... diff --git a/third_party/2and3/werkzeug/urls.pyi b/third_party/2and3/werkzeug/urls.pyi index e2f724437..be9bf0963 100644 --- a/third_party/2and3/werkzeug/urls.pyi +++ b/third_party/2and3/werkzeug/urls.pyi @@ -1,5 +1,5 @@ from collections import namedtuple -from typing import Any +from typing import Any, Optional, Text _URLTuple = namedtuple( @@ -32,36 +32,41 @@ class BaseURL(_URLTuple): def decode_netloc(self): ... def to_uri_tuple(self): ... def to_iri_tuple(self): ... - def get_file_location(self, pathformat=None): ... + def get_file_location(self, pathformat: Optional[Any] = ...): ... class URL(BaseURL): def encode_netloc(self): ... - def encode(self, charset='', errors=''): ... + def encode(self, charset: Text = ..., errors: Text = ...): ... class BytesURL(BaseURL): def encode_netloc(self): ... - def decode(self, charset='', errors=''): ... + def decode(self, charset: Text = ..., errors: Text = ...): ... -def url_parse(url, scheme=None, allow_fragments=True): ... -def url_quote(string, charset='', errors='', safe='', unsafe=''): ... -def url_quote_plus(string, charset='', errors='', safe=''): ... +def url_parse(url, scheme: Optional[Any] = ..., allow_fragments: bool = ...): ... +def url_quote(string, charset: Text = ..., errors: Text = ..., safe: str = ..., unsafe: str = ...): ... +def url_quote_plus(string, charset: Text = ..., errors: Text = ..., safe: str = ...): ... def url_unparse(components): ... -def url_unquote(string, charset='', errors='', unsafe=''): ... -def url_unquote_plus(s, charset='', errors=''): ... -def url_fix(s, charset=''): ... -def uri_to_iri(uri, charset='', errors=''): ... -def iri_to_uri(iri, charset='', errors='', safe_conversion=False): ... -def url_decode(s, charset='', decode_keys=False, include_empty=True, errors='', separator='', cls=None): ... -def url_decode_stream(stream, charset='', decode_keys=False, include_empty=True, errors='', separator='', cls=None, limit=None, return_iterator=False): ... -def url_encode(obj, charset='', encode_keys=False, sort=False, key=None, separator: bytes = ...): ... -def url_encode_stream(obj, stream=None, charset='', encode_keys=False, sort=False, key=None, separator: bytes = ...): ... -def url_join(base, url, allow_fragments=True): ... +def url_unquote(string, charset: Text = ..., errors: Text = ..., unsafe: str = ...): ... +def url_unquote_plus(s, charset: Text = ..., errors: Text = ...): ... +def url_fix(s, charset: Text = ...): ... +def uri_to_iri(uri, charset: Text = ..., errors: Text = ...): ... +def iri_to_uri(iri, charset: Text = ..., errors: Text = ..., safe_conversion: bool = ...): ... +def url_decode(s, charset: Text = ..., decode_keys: bool = ..., include_empty: bool = ..., errors: Text = ..., + separator: str = ..., cls: Optional[Any] = ...): ... +def url_decode_stream(stream, charset: Text = ..., decode_keys: bool = ..., include_empty: bool = ..., errors: Text = ..., + separator: str = ..., cls: Optional[Any] = ..., limit: Optional[Any] = ..., + return_iterator: bool = ...): ... +def url_encode(obj, charset: Text = ..., encode_keys: bool = ..., sort: bool = ..., key: Optional[Any] = ..., + separator: bytes = ...): ... +def url_encode_stream(obj, stream: Optional[Any] = ..., charset: Text = ..., encode_keys: bool = ..., sort: bool = ..., + key: Optional[Any] = ..., separator: bytes = ...): ... +def url_join(base, url, allow_fragments: bool = ...): ... class Href: base = ... # type: Any - charset = ... # type: Any + charset: Text sort = ... # type: Any key = ... # type: Any - def __init__(self, base='', charset='', sort=False, key=None): ... + def __init__(self, base: str = ..., charset: Text = ..., sort: bool = ..., key: Optional[Any] = ...): ... def __getattr__(self, name): ... def __call__(self, *path, **query): ... diff --git a/third_party/2and3/werkzeug/utils.pyi b/third_party/2and3/werkzeug/utils.pyi index 8e2e6b9e7..87801fc07 100644 --- a/third_party/2and3/werkzeug/utils.pyi +++ b/third_party/2and3/werkzeug/utils.pyi @@ -1,4 +1,4 @@ -from typing import Any +from typing import Any, Optional from werkzeug._internal import _DictAccessorProperty class cached_property(property): @@ -6,9 +6,9 @@ class cached_property(property): __module__ = ... # type: Any __doc__ = ... # type: Any func = ... # type: Any - def __init__(self, func, name=None, doc=None): ... + def __init__(self, func, name: Optional[Any] = ..., doc: Optional[Any] = ...): ... def __set__(self, obj, value): ... - def __get__(self, obj, type=None): ... + def __get__(self, obj, type: Optional[Any] = ...): ... class environ_property(_DictAccessorProperty): read_only = ... # type: Any @@ -28,20 +28,20 @@ xhtml = ... # type: Any def get_content_type(mimetype, charset): ... def format_string(string, context): ... def secure_filename(filename): ... -def escape(s, quote=None): ... +def escape(s, quote: Optional[Any] = ...): ... def unescape(s): ... -def redirect(location, code=302, Response=None): ... -def append_slash_redirect(environ, code=301): ... -def import_string(import_name, silent=False): ... -def find_modules(import_path, include_packages=False, recursive=False): ... -def validate_arguments(func, args, kwargs, drop_extra=True): ... +def redirect(location, code: int = ..., Response: Optional[Any] = ...): ... +def append_slash_redirect(environ, code: int = ...): ... +def import_string(import_name, silent: bool = ...): ... +def find_modules(import_path, include_packages: bool = ..., recursive: bool = ...): ... +def validate_arguments(func, args, kwargs, drop_extra: bool = ...): ... def bind_arguments(func, args, kwargs): ... class ArgumentValidationError(ValueError): missing = ... # type: Any extra = ... # type: Any extra_positional = ... # type: Any - def __init__(self, missing=None, extra=None, extra_positional=None): ... + def __init__(self, missing: Optional[Any] = ..., extra: Optional[Any] = ..., extra_positional: Optional[Any] = ...): ... class ImportStringError(ImportError): import_name = ... # type: Any diff --git a/third_party/2and3/werkzeug/wrappers.pyi b/third_party/2and3/werkzeug/wrappers.pyi index 44c0579fe..b6a9b4765 100644 --- a/third_party/2and3/werkzeug/wrappers.pyi +++ b/third_party/2and3/werkzeug/wrappers.pyi @@ -105,8 +105,9 @@ class BaseResponse: def calculate_content_length(self) -> Optional[int]: ... def make_sequence(self) -> None: ... def iter_encoded(self) -> Iterator[bytes]: ... - def set_cookie(self, key, value='', max_age=None, expires=None, path='', domain=None, secure=False, httponly=False): ... - def delete_cookie(self, key, path='', domain=None): ... + def set_cookie(self, key, value: str = ..., max_age: Optional[Any] = ..., expires: Optional[Any] = ..., + path: str = ..., domain: Optional[Any] = ..., secure: bool = ..., httponly: bool = ...): ... + def delete_cookie(self, key, path: str = ..., domain: Optional[Any] = ...): ... @property def is_streamed(self) -> bool: ... @property @@ -156,9 +157,9 @@ class ETagResponseMixin: @property def cache_control(self): ... status_code = ... # type: Any - def make_conditional(self, request_or_environ, accept_ranges=False, complete_length=None): ... - def add_etag(self, overwrite=False, weak=False): ... - def set_etag(self, etag, weak=False): ... + def make_conditional(self, request_or_environ, accept_ranges: bool = ..., complete_length: Optional[Any] = ...): ... + def add_etag(self, overwrite: bool = ..., weak: bool = ...): ... + def set_etag(self, etag, weak: bool = ...): ... def get_etag(self): ... def freeze(self, no_etag: bool = ...) -> None: ... accept_ranges = ... # type: Any diff --git a/third_party/2and3/werkzeug/wsgi.pyi b/third_party/2and3/werkzeug/wsgi.pyi index ef342afd6..695c34a99 100644 --- a/third_party/2and3/werkzeug/wsgi.pyi +++ b/third_party/2and3/werkzeug/wsgi.pyi @@ -1,18 +1,20 @@ -from typing import Any, Optional, Protocol, Iterable +from typing import Any, Optional, Protocol, Iterable, Text from wsgiref.types import WSGIEnvironment, InputStream def responder(f): ... -def get_current_url(environ, root_only=False, strip_querystring=False, host_only=False, trusted_hosts=None): ... +def get_current_url(environ, root_only: bool = ..., strip_querystring: bool = ..., host_only: bool = ..., + trusted_hosts: Optional[Any] = ...): ... def host_is_trusted(hostname, trusted_list): ... -def get_host(environ, trusted_hosts=None): ... +def get_host(environ, trusted_hosts: Optional[Any] = ...): ... def get_content_length(environ: WSGIEnvironment) -> Optional[int]: ... def get_input_stream(environ: WSGIEnvironment, safe_fallback: bool = ...) -> InputStream: ... def get_query_string(environ): ... -def get_path_info(environ, charset='', errors=''): ... -def get_script_name(environ, charset='', errors=''): ... -def pop_path_info(environ, charset='', errors=''): ... -def peek_path_info(environ, charset='', errors=''): ... -def extract_path_info(environ_or_baseurl, path_or_url, charset='', errors='', collapse_http_schemes=True): ... +def get_path_info(environ, charset: Text = ..., errors: Text = ...): ... +def get_script_name(environ, charset: Text = ..., errors: Text = ...): ... +def pop_path_info(environ, charset: Text = ..., errors: Text = ...): ... +def peek_path_info(environ, charset: Text = ..., errors: Text = ...): ... +def extract_path_info(environ_or_baseurl, path_or_url, charset: Text = ..., errors: Text = ..., + collapse_http_schemes: bool = ...): ... class SharedDataMiddleware: app = ... # type: Any @@ -20,7 +22,8 @@ class SharedDataMiddleware: cache = ... # type: Any cache_timeout = ... # type: Any fallback_mimetype = ... # type: Any - def __init__(self, app, exports, disallow=None, cache=True, cache_timeout=..., fallback_mimetype=''): ... + def __init__(self, app, exports, disallow: Optional[Any] = ..., cache: bool = ..., cache_timeout=..., + fallback_mimetype: str = ...): ... def is_allowed(self, filename): ... def get_file_loader(self, filename): ... def get_package_loader(self, package, package_path): ... @@ -31,11 +34,11 @@ class SharedDataMiddleware: class DispatcherMiddleware: app = ... # type: Any mounts = ... # type: Any - def __init__(self, app, mounts=None): ... + def __init__(self, app, mounts: Optional[Any] = ...): ... def __call__(self, environ, start_response): ... class ClosingIterator: - def __init__(self, iterable, callbacks=None): ... + def __init__(self, iterable, callbacks: Optional[Any] = ...): ... def __iter__(self): ... def __next__(self): ... def close(self): ... @@ -64,13 +67,13 @@ class _RangeWrapper: read_length = ... # type: Any seekable = ... # type: Any end_reached = ... # type: Any - def __init__(self, iterable, start_byte=0, byte_range=None): ... + def __init__(self, iterable, start_byte: int = ..., byte_range: Optional[Any] = ...): ... def __iter__(self): ... def __next__(self): ... def close(self): ... -def make_line_iter(stream, limit=None, buffer_size=..., cap_at_buffer=False): ... -def make_chunk_iter(stream, separator, limit=None, buffer_size=..., cap_at_buffer=False): ... +def make_line_iter(stream, limit: Optional[Any] = ..., buffer_size=..., cap_at_buffer: bool = ...): ... +def make_chunk_iter(stream, separator, limit: Optional[Any] = ..., buffer_size=..., cap_at_buffer: bool = ...): ... class LimitedStream: limit = ... # type: Any @@ -81,8 +84,8 @@ class LimitedStream: def on_exhausted(self): ... def on_disconnect(self): ... def exhaust(self, chunk_size=...): ... - def read(self, size=None): ... - def readline(self, size=None): ... - def readlines(self, size=None): ... + def read(self, size: Optional[Any] = ...): ... + def readline(self, size: Optional[Any] = ...): ... + def readlines(self, size: Optional[Any] = ...): ... def tell(self): ... def __next__(self): ... diff --git a/third_party/3/itsdangerous.pyi b/third_party/3/itsdangerous.pyi index 91b2aca66..89a9cf003 100644 --- a/third_party/3/itsdangerous.pyi +++ b/third_party/3/itsdangerous.pyi @@ -43,7 +43,8 @@ class BadTimeSignature(BadSignature): class BadHeader(BadSignature): header = ... # type: Any original_error = ... # type: Any - def __init__(self, message, payload=None, header=None, original_error=None) -> None: ... + def __init__(self, message, payload: Optional[Any] = ..., header: Optional[Any] = ..., + original_error: Optional[Any] = ...) -> None: ... class SignatureExpired(BadTimeSignature): ... @@ -74,7 +75,8 @@ class Signer: key_derivation = ... # type: str digest_method = ... # type: Callable algorithm = ... # type: SigningAlgorithm - def __init__(self, secret_key: _can_become_bytes, salt: Optional[_can_become_bytes] = ..., sep: Optional[_can_become_bytes] = ..., + def __init__(self, secret_key: _can_become_bytes, salt: Optional[_can_become_bytes] = ..., + sep: Optional[_can_become_bytes] = ..., key_derivation: Optional[str] = ..., digest_method: Optional[Callable] = ..., algorithm: Optional[SigningAlgorithm] = ...) -> None: ... @@ -101,7 +103,9 @@ class Serializer: is_text_serializer = ... # type: bool signer = ... # type: Signer signer_kwargs = ... # type: MutableMapping - def __init__(self, secret_key: _can_become_bytes, salt: Optional[_can_become_bytes] = ..., serializer: Optional[_serializer] = ..., signer: Optional[Callable[..., Signer]] = ..., signer_kwargs: Optional[MutableMapping] = ...) -> None: ... + def __init__(self, secret_key: _can_become_bytes, salt: Optional[_can_become_bytes] = ..., + serializer: Optional[_serializer] = ..., signer: Optional[Callable[..., Signer]] = ..., + signer_kwargs: Optional[MutableMapping] = ...) -> None: ... def load_payload(self, payload: Any, serializer: Optional[_serializer] = ...) -> Any: ... def dump_payload(self, *args, **kwargs) -> bytes: ... def make_signer(self, salt: Optional[_can_become_bytes] = ...) -> Signer: ... @@ -114,8 +118,10 @@ class Serializer: class TimedSerializer(Serializer): default_signer = ... # type: Callable[..., TimestampSigner] - def loads(self, s: _can_become_bytes, salt: Optional[_can_become_bytes] = ..., max_age: Optional[int] = ..., return_timestamp: bool = ...) -> Any: ... - def loads_unsafe(self, s: _can_become_bytes, salt: Optional[_can_become_bytes] = ..., max_age: Optional[int] = ...) -> Tuple[bool, Any]: ... + def loads(self, s: _can_become_bytes, salt: Optional[_can_become_bytes] = ..., max_age: Optional[int] = ..., + return_timestamp: bool = ...) -> Any: ... + def loads_unsafe(self, s: _can_become_bytes, salt: Optional[_can_become_bytes] = ..., + max_age: Optional[int] = ...) -> Tuple[bool, Any]: ... class JSONWebSignatureSerializer(Serializer): jws_algorithms = ... # type: MutableMapping[str, SigningAlgorithm] @@ -123,21 +129,24 @@ class JSONWebSignatureSerializer(Serializer): default_serializer = ... # type: Any algorithm_name = ... # type: str algorithm = ... # type: Any - def __init__(self, secret_key: _can_become_bytes, salt: Optional[_can_become_bytes] = ..., serializer: Optional[_serializer] = ..., signer: Optional[Callable[..., Signer]] = ..., signer_kwargs: Optional[MutableMapping] = ..., algorithm_name: Optional[str] = ...) -> None: ... + def __init__(self, secret_key: _can_become_bytes, salt: Optional[_can_become_bytes] = ..., + serializer: Optional[_serializer] = ..., signer: Optional[Callable[..., Signer]] = ..., + signer_kwargs: Optional[MutableMapping] = ..., algorithm_name: Optional[str] = ...) -> None: ... def load_payload(self, payload: Any, serializer: Optional[_serializer] = ..., return_header: bool = ...) -> Any: ... def dump_payload(self, *args, **kwargs) -> bytes: ... def make_algorithm(self, algorithm_name: str) -> SigningAlgorithm: ... def make_signer(self, salt: Optional[_can_become_bytes] = ..., algorithm_name: Optional[str] = ...) -> Signer: ... - def make_header(self, header_fields=Optional[MutableMapping]) -> MutableMapping: ... + def make_header(self, header_fields: Optional[MutableMapping]) -> MutableMapping: ... def dumps(self, obj: Any, salt: Optional[_can_become_bytes] = ..., header_fields: Optional[MutableMapping] = ...) -> str: ... def loads(self, s: _can_become_bytes, salt: Optional[_can_become_bytes] = ..., return_header: bool = ...) -> Any: ... - def loads_unsafe(self, s: _can_become_bytes, salt: Optional[_can_become_bytes] = ..., return_header: bool = ...) -> Tuple[bool, Any]: ... + def loads_unsafe(self, s: _can_become_bytes, salt: Optional[_can_become_bytes] = ..., + return_header: bool = ...) -> Tuple[bool, Any]: ... class TimedJSONWebSignatureSerializer(JSONWebSignatureSerializer): DEFAULT_EXPIRES_IN = ... # type: int expires_in = ... # type: int def __init__(self, secret_key: _can_become_bytes, expires_in: Optional[int] = ..., **kwargs) -> None: ... - def make_header(self, header_fields=Optional[MutableMapping]) -> MutableMapping: ... + def make_header(self, header_fields: Optional[MutableMapping]) -> MutableMapping: ... def loads(self, s: _can_become_bytes, salt: Optional[_can_become_bytes] = ..., return_header: bool = ...) -> Any: ... def get_issue_date(self, header: MutableMapping) -> Optional[datetime]: ... def now(self) -> int: ...