Replace non-ellipsis default arguments (#2550)

This commit is contained in:
Sebastian Rittau
2018-11-20 16:35:06 +01:00
committed by Jelle Zijlstra
parent b7d6bab83f
commit cd75801aa5
55 changed files with 649 additions and 566 deletions

View File

@@ -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: ...

View File

@@ -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

View File

@@ -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): ...

View File

@@ -12,4 +12,4 @@ def isawaitable(obj): ...
PATCHED = ... # type: Any
def patch(patch_inspect=True): ...
def patch(patch_inspect: bool = ...): ...

View File

@@ -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:
...

View File

@@ -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

View File

@@ -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]: ...

View File

@@ -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 = ...): ...

View File

@@ -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] = ...): ...

View File

@@ -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 = ...): ...

View File

@@ -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): ...

View File

@@ -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): ...

View File

@@ -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): ...

View File

@@ -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 = ...): ...

View File

@@ -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): ...

View File

@@ -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): ...

View File

@@ -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=...): ...

View File

@@ -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 = ...): ...

View File

@@ -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): ...

View File

@@ -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

View File

@@ -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): ...

View File

@@ -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): ...

View File

@@ -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] = ...): ...

View File

@@ -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): ...

View File

@@ -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: ...

View File

@@ -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): ...

View File

@@ -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): ...

View File

@@ -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 = ...): ...

View File

@@ -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] = ...): ...

View File

@@ -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): ...

View File

@@ -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(): ...

View File

@@ -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 = ...): ...

View File

@@ -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): ...

View File

@@ -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

View File

@@ -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

View File

@@ -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): ...

View File

@@ -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: ...