Remove stubs for pallets projects (#6465)

All pallets projects (Flask, Werkzeug, Jinja, Click, ItsDangerous, and
MarkupSafe) have now shipped their own stubs since May 2021. The
maintainer requested removal back then.

Closes: #5423
This commit is contained in:
Sebastian Rittau
2021-12-01 18:34:34 +01:00
committed by GitHub
parent ec0051a59b
commit 8542b3518a
117 changed files with 0 additions and 7268 deletions

View File

@@ -1,4 +0,0 @@
version = "1.1.*"
python2 = true
requires = ["types-Jinja2", "types-Werkzeug", "types-click"]
obsolete_since = "2.0"

View File

@@ -1,41 +0,0 @@
from jinja2 import Markup as Markup, escape as escape
from werkzeug.exceptions import abort as abort
from werkzeug.utils import redirect as redirect
from .app import Flask as Flask
from .blueprints import Blueprint as Blueprint
from .config import Config as Config
from .ctx import (
after_this_request as after_this_request,
copy_current_request_context as copy_current_request_context,
has_app_context as has_app_context,
has_request_context as has_request_context,
)
from .globals import current_app as current_app, g as g, request as request, session as session
from .helpers import (
flash as flash,
get_flashed_messages as get_flashed_messages,
get_template_attribute as get_template_attribute,
make_response as make_response,
safe_join as safe_join,
send_file as send_file,
send_from_directory as send_from_directory,
stream_with_context as stream_with_context,
url_for as url_for,
)
from .json import jsonify as jsonify
from .signals import (
appcontext_popped as appcontext_popped,
appcontext_pushed as appcontext_pushed,
appcontext_tearing_down as appcontext_tearing_down,
before_render_template as before_render_template,
got_request_exception as got_request_exception,
message_flashed as message_flashed,
request_finished as request_finished,
request_started as request_started,
request_tearing_down as request_tearing_down,
signals_available as signals_available,
template_rendered as template_rendered,
)
from .templating import render_template as render_template, render_template_string as render_template_string
from .wrappers import Request as Request, Response as Response

View File

@@ -1,194 +0,0 @@
from datetime import timedelta
from logging import Logger
from types import TracebackType
from typing import (
Any,
ByteString,
Callable,
ContextManager,
Dict,
Iterable,
List,
NoReturn,
Optional,
Text,
Tuple,
Type,
TypeVar,
Union,
)
from .blueprints import Blueprint
from .config import Config
from .ctx import AppContext, RequestContext
from .helpers import _PackageBoundObject
from .testing import FlaskClient
from .wrappers import Response
def setupmethod(f: Any): ...
_T = TypeVar("_T")
_ExcInfo = Tuple[Optional[Type[BaseException]], Optional[BaseException], Optional[TracebackType]]
_StartResponse = Callable[[str, List[Tuple[str, str]], Optional[_ExcInfo]], Callable[[bytes], Any]]
_WSGICallable = Callable[[Dict[Text, Any], _StartResponse], Iterable[bytes]]
_Status = Union[str, int]
_Headers = Union[Dict[Any, Any], List[Tuple[Any, Any]]]
_Body = Union[Text, ByteString, Dict[Text, Any], Response, _WSGICallable]
_ViewFuncReturnType = Union[_Body, Tuple[_Body, _Status, _Headers], Tuple[_Body, _Status], Tuple[_Body, _Headers]]
_ViewFunc = Union[Callable[..., NoReturn], Callable[..., _ViewFuncReturnType]]
_VT = TypeVar("_VT", bound=_ViewFunc)
class Flask(_PackageBoundObject):
request_class: type = ...
response_class: type = ...
jinja_environment: type = ...
app_ctx_globals_class: type = ...
config_class: Type[Config] = ...
testing: Any = ...
secret_key: Text | bytes | None = ...
session_cookie_name: Any = ...
permanent_session_lifetime: timedelta = ...
send_file_max_age_default: timedelta = ...
use_x_sendfile: Any = ...
json_encoder: Any = ...
json_decoder: Any = ...
jinja_options: Any = ...
default_config: Any = ...
url_rule_class: type = ...
test_client_class: type = ...
test_cli_runner_class: type = ...
session_interface: Any = ...
import_name: str = ...
template_folder: str = ...
root_path: str | Text = ...
static_url_path: Any = ...
static_folder: str | None = ...
instance_path: str | Text = ...
config: Config = ...
view_functions: Any = ...
error_handler_spec: Any = ...
url_build_error_handlers: Any = ...
before_request_funcs: dict[str | None, list[Callable[[], Any]]] = ...
before_first_request_funcs: list[Callable[[], None]] = ...
after_request_funcs: dict[str | None, list[Callable[[Response], Response]]] = ...
teardown_request_funcs: dict[str | None, list[Callable[[Exception | None], Any]]] = ...
teardown_appcontext_funcs: list[Callable[[Exception | None], Any]] = ...
url_value_preprocessors: Any = ...
url_default_functions: Any = ...
template_context_processors: Any = ...
shell_context_processors: Any = ...
blueprints: Any = ...
extensions: Any = ...
url_map: Any = ...
subdomain_matching: Any = ...
cli: Any = ...
def __init__(
self,
import_name: str,
static_url_path: str | None = ...,
static_folder: str | None = ...,
static_host: str | None = ...,
host_matching: bool = ...,
subdomain_matching: bool = ...,
template_folder: str = ...,
instance_path: str | None = ...,
instance_relative_config: bool = ...,
root_path: str | None = ...,
) -> None: ...
@property
def name(self) -> str: ...
@property
def propagate_exceptions(self) -> bool: ...
@property
def preserve_context_on_exception(self): ...
@property
def logger(self) -> Logger: ...
@property
def jinja_env(self): ...
@property
def got_first_request(self) -> bool: ...
def make_config(self, instance_relative: bool = ...): ...
def auto_find_instance_path(self): ...
def open_instance_resource(self, resource: str | Text, mode: str = ...): ...
templates_auto_reload: Any = ...
def create_jinja_environment(self): ...
def create_global_jinja_loader(self): ...
def select_jinja_autoescape(self, filename: Any): ...
def update_template_context(self, context: Any) -> None: ...
def make_shell_context(self): ...
env: str | None = ...
debug: bool = ...
def run(
self,
host: str | None = ...,
port: int | str | None = ...,
debug: bool | None = ...,
load_dotenv: bool = ...,
**options: Any,
) -> None: ...
def test_client(self, use_cookies: bool = ..., **kwargs: Any) -> FlaskClient[Response]: ...
def test_cli_runner(self, **kwargs: Any): ...
def open_session(self, request: Any): ...
def save_session(self, session: Any, response: Any): ...
def make_null_session(self): ...
def register_blueprint(self, blueprint: Blueprint, **options: Any) -> None: ...
def iter_blueprints(self): ...
def add_url_rule(
self,
rule: str,
endpoint: str | None = ...,
view_func: _ViewFunc = ...,
provide_automatic_options: bool | None = ...,
**options: Any,
) -> None: ...
def route(self, rule: str, **options: Any) -> Callable[[_VT], _VT]: ...
def endpoint(self, endpoint: str) -> Callable[[Callable[..., _T]], Callable[..., _T]]: ...
def errorhandler(self, code_or_exception: int | Type[Exception]) -> Callable[[Callable[..., _T]], Callable[..., _T]]: ...
def register_error_handler(self, code_or_exception: int | Type[Exception], f: Callable[..., Any]) -> None: ...
def template_filter(self, name: Any | None = ...): ...
def add_template_filter(self, f: Any, name: Any | None = ...) -> None: ...
def template_test(self, name: Any | None = ...): ...
def add_template_test(self, f: Any, name: Any | None = ...) -> None: ...
def template_global(self, name: Any | None = ...): ...
def add_template_global(self, f: Any, name: Any | None = ...) -> None: ...
def before_request(self, f: Callable[[], _T]) -> Callable[[], _T]: ...
def before_first_request(self, f: Callable[[], _T]) -> Callable[[], _T]: ...
def after_request(self, f: Callable[[Response], Response]) -> Callable[[Response], Response]: ...
def teardown_request(self, f: Callable[[Exception | None], _T]) -> Callable[[Exception | None], _T]: ...
def teardown_appcontext(self, f: Callable[[Exception | None], _T]) -> Callable[[Exception | None], _T]: ...
def context_processor(self, f: Any): ...
def shell_context_processor(self, f: Any): ...
def url_value_preprocessor(self, f: Any): ...
def url_defaults(self, f: Any): ...
def handle_http_exception(self, e: Any): ...
def trap_http_exception(self, e: Any): ...
def handle_user_exception(self, e: Any): ...
def handle_exception(self, e: Any): ...
def log_exception(self, exc_info: Any) -> None: ...
def raise_routing_exception(self, request: Any) -> None: ...
def dispatch_request(self): ...
def full_dispatch_request(self): ...
def finalize_request(self, rv: Any, from_error_handler: bool = ...): ...
def try_trigger_before_first_request_functions(self): ...
def make_default_options_response(self): ...
def should_ignore_error(self, error: Any): ...
def make_response(self, rv: Any): ...
def create_url_adapter(self, request: Any): ...
def inject_url_defaults(self, endpoint: Any, values: Any) -> None: ...
def handle_url_build_error(self, error: Any, endpoint: Any, values: Any): ...
def preprocess_request(self): ...
def process_response(self, response: Any): ...
def do_teardown_request(self, exc: Any = ...) -> None: ...
def do_teardown_appcontext(self, exc: Any = ...) -> None: ...
def app_context(self) -> AppContext: ...
def request_context(self, environ: Any): ...
def test_request_context(self, *args: Any, **kwargs: Any) -> ContextManager[RequestContext]: ...
def wsgi_app(self, environ: Any, start_response: Any): ...
def __call__(self, environ: Any, start_response: Any): ...
# These are not preset at runtime but we add them since monkeypatching this
# class is quite common.
def __setattr__(self, name: str, value: Any): ...
def __getattr__(self, name: str): ...

View File

@@ -1,78 +0,0 @@
from typing import Any, Callable, Type, TypeVar
from .app import _ViewFunc
from .helpers import _PackageBoundObject
_T = TypeVar("_T")
_VT = TypeVar("_VT", bound=_ViewFunc)
class _Sentinel(object): ...
class BlueprintSetupState:
app: Any = ...
blueprint: Any = ...
options: Any = ...
first_registration: Any = ...
subdomain: Any = ...
url_prefix: Any = ...
url_defaults: Any = ...
def __init__(self, blueprint: Any, app: Any, options: Any, first_registration: Any) -> None: ...
def add_url_rule(self, rule: str, endpoint: str | None = ..., view_func: _ViewFunc = ..., **options: Any) -> None: ...
class Blueprint(_PackageBoundObject):
warn_on_modifications: bool = ...
json_encoder: Any = ...
json_decoder: Any = ...
import_name: str = ...
template_folder: str | None = ...
root_path: str = ...
name: str = ...
url_prefix: str | None = ...
subdomain: str | None = ...
static_folder: str | None = ...
static_url_path: str | None = ...
deferred_functions: Any = ...
url_values_defaults: Any = ...
cli_group: str | None | _Sentinel = ...
def __init__(
self,
name: str,
import_name: str,
static_folder: str | None = ...,
static_url_path: str | None = ...,
template_folder: str | None = ...,
url_prefix: str | None = ...,
subdomain: str | None = ...,
url_defaults: Any | None = ...,
root_path: str | None = ...,
cli_group: str | None | _Sentinel = ...,
) -> None: ...
def record(self, func: Any) -> None: ...
def record_once(self, func: Any): ...
def make_setup_state(self, app: Any, options: Any, first_registration: bool = ...): ...
def register(self, app: Any, options: Any, first_registration: bool = ...) -> None: ...
def route(self, rule: str, **options: Any) -> Callable[[_VT], _VT]: ...
def add_url_rule(self, rule: str, endpoint: str | None = ..., view_func: _ViewFunc = ..., **options: Any) -> None: ...
def endpoint(self, endpoint: str) -> Callable[[Callable[..., _T]], Callable[..., _T]]: ...
def app_template_filter(self, name: Any | None = ...): ...
def add_app_template_filter(self, f: Any, name: Any | None = ...) -> None: ...
def app_template_test(self, name: Any | None = ...): ...
def add_app_template_test(self, f: Any, name: Any | None = ...) -> None: ...
def app_template_global(self, name: Any | None = ...): ...
def add_app_template_global(self, f: Any, name: Any | None = ...) -> None: ...
def before_request(self, f: Any): ...
def before_app_request(self, f: Any): ...
def before_app_first_request(self, f: Any): ...
def after_request(self, f: Any): ...
def after_app_request(self, f: Any): ...
def teardown_request(self, f: Any): ...
def teardown_app_request(self, f: Any): ...
def context_processor(self, f: Any): ...
def app_context_processor(self, f: Any): ...
def app_errorhandler(self, code: Any): ...
def url_value_preprocessor(self, f: Any): ...
def url_defaults(self, f: Any): ...
def app_url_value_preprocessor(self, f: Any): ...
def app_url_defaults(self, f: Any): ...
def errorhandler(self, code_or_exception: int | Type[Exception]) -> Callable[[Callable[..., _T]], Callable[..., _T]]: ...
def register_error_handler(self, code_or_exception: int | Type[Exception], f: Callable[..., Any]) -> None: ...

View File

@@ -1,68 +0,0 @@
from typing import Any
import click
class NoAppException(click.UsageError): ...
def find_best_app(script_info: Any, module: Any): ...
def call_factory(script_info: Any, app_factory: Any, arguments: Any = ...): ...
def find_app_by_string(script_info: Any, module: Any, app_name: Any): ...
def prepare_import(path: Any): ...
def locate_app(script_info: Any, module_name: Any, app_name: Any, raise_if_not_found: bool = ...): ...
def get_version(ctx: Any, param: Any, value: Any): ...
version_option: Any
class DispatchingApp:
loader: Any = ...
def __init__(self, loader: Any, use_eager_loading: bool = ...) -> None: ...
def __call__(self, environ: Any, start_response: Any): ...
class ScriptInfo:
app_import_path: Any = ...
create_app: Any = ...
data: Any = ...
def __init__(self, app_import_path: Any | None = ..., create_app: Any | None = ...) -> None: ...
def load_app(self): ...
pass_script_info: Any
def with_appcontext(f: Any): ...
class AppGroup(click.Group):
def command(self, *args: Any, **kwargs: Any): ...
def group(self, *args: Any, **kwargs: Any): ...
class FlaskGroup(AppGroup):
create_app: Any = ...
load_dotenv: Any = ...
def __init__(
self,
add_default_commands: bool = ...,
create_app: Any | None = ...,
add_version_option: bool = ...,
load_dotenv: bool = ...,
**extra: Any,
) -> None: ...
def get_command(self, ctx: Any, name: Any): ...
def list_commands(self, ctx: Any): ...
def main(self, *args: Any, **kwargs: Any): ...
def load_dotenv(path: Any | None = ...): ...
def show_server_banner(env: Any, debug: Any, app_import_path: Any, eager_loading: Any): ...
class CertParamType(click.ParamType):
name: str = ...
path_type: Any = ...
def __init__(self) -> None: ...
def convert(self, value: Any, param: Any, ctx: Any): ...
def run_command(
info: Any, host: Any, port: Any, reload: Any, debugger: Any, eager_loading: Any, with_threads: Any, cert: Any
) -> None: ...
def shell_command() -> None: ...
def routes_command(sort: Any, all_methods: Any): ...
cli: Any
def main(as_module: bool = ...) -> None: ...

View File

@@ -1,18 +0,0 @@
from typing import Any, Dict
class ConfigAttribute:
__name__: Any = ...
get_converter: Any = ...
def __init__(self, name: Any, get_converter: Any | None = ...) -> None: ...
def __get__(self, obj: Any, type: Any | None = ...): ...
def __set__(self, obj: Any, value: Any) -> None: ...
class Config(Dict[str, Any]):
root_path: Any = ...
def __init__(self, root_path: Any, defaults: Any | None = ...) -> None: ...
def from_envvar(self, variable_name: Any, silent: bool = ...): ...
def from_pyfile(self, filename: Any, silent: bool = ...): ...
def from_object(self, obj: Any) -> None: ...
def from_json(self, filename: Any, silent: bool = ...): ...
def from_mapping(self, *mapping: Any, **kwargs: Any): ...
def get_namespace(self, namespace: Any, lowercase: bool = ..., trim_namespace: bool = ...): ...

View File

@@ -1,40 +0,0 @@
from typing import Any
class _AppCtxGlobals:
def get(self, name: Any, default: Any | None = ...): ...
def pop(self, name: Any, default: Any = ...): ...
def setdefault(self, name: Any, default: Any | None = ...): ...
def __contains__(self, item: Any): ...
def __iter__(self): ...
def after_this_request(f: Any): ...
def copy_current_request_context(f: Any): ...
def has_request_context(): ...
def has_app_context(): ...
class AppContext:
app: Any = ...
url_adapter: Any = ...
g: Any = ...
def __init__(self, app: Any) -> None: ...
def push(self) -> None: ...
def pop(self, exc: Any = ...) -> None: ...
def __enter__(self): ...
def __exit__(self, exc_type: Any, exc_value: Any, tb: Any) -> None: ...
class RequestContext:
app: Any = ...
request: Any = ...
url_adapter: Any = ...
flashes: Any = ...
session: Any = ...
preserved: bool = ...
def __init__(self, app: Any, environ: Any, request: Any | None = ...) -> None: ...
g: Any = ...
def copy(self): ...
def match_request(self) -> None: ...
def push(self) -> None: ...
def pop(self, exc: Any = ...) -> None: ...
def auto_pop(self, exc: Any) -> None: ...
def __enter__(self): ...
def __exit__(self, exc_type: Any, exc_value: Any, tb: Any) -> None: ...

View File

@@ -1,14 +0,0 @@
from typing import Any
class UnexpectedUnicodeError(AssertionError, UnicodeError): ...
class DebugFilesKeyError(KeyError, AssertionError):
msg: Any = ...
def __init__(self, request: Any, key: Any) -> None: ...
class FormDataRoutingRedirect(AssertionError):
def __init__(self, request: Any) -> None: ...
def attach_enctype_error_multidict(request: Any): ...
def explain_template_loading_attempts(app: Any, template: Any, attempts: Any) -> None: ...
def explain_ignored_app_run() -> None: ...

View File

@@ -1,16 +0,0 @@
from typing import Any
from werkzeug.local import LocalStack
from .app import Flask
from .wrappers import Request
class _FlaskLocalProxy(Flask):
def _get_current_object(self) -> Flask: ...
_request_ctx_stack: LocalStack
_app_ctx_stack: LocalStack
current_app: _FlaskLocalProxy
request: Request
session: Any
g: Any

View File

@@ -1,55 +0,0 @@
from typing import Any
from .cli import AppGroup
from .wrappers import Response
def get_env(): ...
def get_debug_flag(): ...
def get_load_dotenv(default: bool = ...): ...
def stream_with_context(generator_or_function: Any): ...
def make_response(*args: Any) -> Response: ...
def url_for(endpoint: str, **values: Any) -> str: ...
def get_template_attribute(template_name: Any, attribute: Any): ...
def flash(message: Any, category: str = ...) -> None: ...
def get_flashed_messages(with_categories: bool = ..., category_filter: Any = ...): ...
def send_file(
filename_or_fp: Any,
mimetype: Any | None = ...,
as_attachment: bool = ...,
attachment_filename: Any | None = ...,
add_etags: bool = ...,
cache_timeout: Any | None = ...,
conditional: bool = ...,
last_modified: Any | None = ...,
) -> Response: ...
def safe_join(directory: Any, *pathnames: Any): ...
def send_from_directory(directory: Any, filename: Any, **options: Any) -> Response: ...
def get_root_path(import_name: Any): ...
def find_package(import_name: Any): ...
class locked_cached_property:
__name__: Any = ...
__module__: Any = ...
__doc__: Any = ...
func: Any = ...
lock: Any = ...
def __init__(self, func: Any, name: Any | None = ..., doc: Any | None = ...) -> None: ...
def __get__(self, obj: Any, type: Any | None = ...): ...
class _PackageBoundObject:
import_name: Any = ...
template_folder: Any = ...
root_path: Any = ...
cli: AppGroup = ...
def __init__(self, import_name: Any, template_folder: Any | None = ..., root_path: Any | None = ...) -> None: ...
static_folder: Any = ...
static_url_path: Any = ...
@property
def has_static_folder(self): ...
def jinja_loader(self): ...
def get_send_file_max_age(self, filename: Any): ...
def send_static_file(self, filename: Any) -> Response: ...
def open_resource(self, resource: Any, mode: str = ...): ...
def total_seconds(td: Any): ...
def is_ip(value: Any): ...

View File

@@ -1,19 +0,0 @@
import json as _json
from typing import Any
from jinja2 import Markup
class JSONEncoder(_json.JSONEncoder):
def default(self, o: Any): ...
class JSONDecoder(_json.JSONDecoder): ...
def detect_encoding(data: bytes) -> str: ... # undocumented
def dumps(obj: Any, **kwargs: Any): ...
def dump(obj: Any, fp: Any, **kwargs: Any) -> None: ...
def loads(s: Any, **kwargs: Any): ...
def load(fp: Any, **kwargs: Any): ...
def htmlsafe_dumps(obj: Any, **kwargs: Any): ...
def htmlsafe_dump(obj: Any, fp: Any, **kwargs: Any) -> None: ...
def jsonify(*args: Any, **kwargs: Any): ...
def tojson_filter(obj: Any, **kwargs: Any) -> Markup: ... # undocumented

View File

@@ -1,67 +0,0 @@
from typing import Any
class JSONTag:
key: Any = ...
serializer: Any = ...
def __init__(self, serializer: Any) -> None: ...
def check(self, value: Any) -> None: ...
def to_json(self, value: Any) -> None: ...
def to_python(self, value: Any) -> None: ...
def tag(self, value: Any): ...
class TagDict(JSONTag):
key: str = ...
def check(self, value: Any): ...
def to_json(self, value: Any): ...
def to_python(self, value: Any): ...
class PassDict(JSONTag):
def check(self, value: Any): ...
def to_json(self, value: Any): ...
tag: Any = ...
class TagTuple(JSONTag):
key: str = ...
def check(self, value: Any): ...
def to_json(self, value: Any): ...
def to_python(self, value: Any): ...
class PassList(JSONTag):
def check(self, value: Any): ...
def to_json(self, value: Any): ...
tag: Any = ...
class TagBytes(JSONTag):
key: str = ...
def check(self, value: Any): ...
def to_json(self, value: Any): ...
def to_python(self, value: Any): ...
class TagMarkup(JSONTag):
key: str = ...
def check(self, value: Any): ...
def to_json(self, value: Any): ...
def to_python(self, value: Any): ...
class TagUUID(JSONTag):
key: str = ...
def check(self, value: Any): ...
def to_json(self, value: Any): ...
def to_python(self, value: Any): ...
class TagDateTime(JSONTag):
key: str = ...
def check(self, value: Any): ...
def to_json(self, value: Any): ...
def to_python(self, value: Any): ...
class TaggedJSONSerializer:
default_tags: Any = ...
tags: Any = ...
order: Any = ...
def __init__(self) -> None: ...
def register(self, tag_class: Any, force: bool = ..., index: Any | None = ...) -> None: ...
def tag(self, value: Any): ...
def untag(self, value: Any): ...
def dumps(self, value: Any): ...
def loads(self, value: Any): ...

View File

@@ -1,12 +0,0 @@
from _typeshed.wsgi import ErrorStream
from logging import Handler, Logger
from .app import Flask
wsgi_errors_stream: ErrorStream
def has_level_handler(logger: Logger) -> bool: ...
default_handler: Handler
def create_logger(app: Flask) -> Logger: ...

View File

@@ -1,57 +0,0 @@
from abc import ABCMeta
from typing import Any, MutableMapping
from werkzeug.datastructures import CallbackDict
class SessionMixin(MutableMapping[str, Any], metaclass=ABCMeta):
@property
def permanent(self): ...
@permanent.setter
def permanent(self, value: Any) -> None: ...
new: bool = ...
modified: bool = ...
accessed: bool = ...
class SecureCookieSession(CallbackDict[str, Any], SessionMixin):
modified: bool = ...
accessed: bool = ...
def __init__(self, initial: Any | None = ...) -> None: ...
def __getitem__(self, key: Any): ...
def get(self, key: Any, default: Any | None = ...): ...
def setdefault(self, key: Any, default: Any | None = ...): ...
class NullSession(SecureCookieSession):
__setitem__: Any = ...
__delitem__: Any = ...
clear: Any = ...
pop: Any = ...
popitem: Any = ...
update: Any = ...
setdefault: Any = ...
class SessionInterface:
null_session_class: Any = ...
pickle_based: bool = ...
def make_null_session(self, app: Any): ...
def is_null_session(self, obj: Any): ...
def get_cookie_domain(self, app: Any): ...
def get_cookie_path(self, app: Any): ...
def get_cookie_httponly(self, app: Any): ...
def get_cookie_secure(self, app: Any): ...
def get_cookie_samesite(self, app: Any): ...
def get_expiration_time(self, app: Any, session: Any): ...
def should_set_cookie(self, app: Any, session: Any): ...
def open_session(self, app: Any, request: Any) -> None: ...
def save_session(self, app: Any, session: Any, response: Any) -> None: ...
session_json_serializer: Any
class SecureCookieSessionInterface(SessionInterface):
salt: str = ...
digest_method: Any = ...
key_derivation: str = ...
serializer: Any = ...
session_class: Any = ...
def get_signing_serializer(self, app: Any): ...
def open_session(self, app: Any, request: Any): ...
def save_session(self, app: Any, session: Any, response: Any): ...

View File

@@ -1,29 +0,0 @@
from typing import Any
signals_available: bool
class Namespace:
def signal(self, name: Any, doc: Any | None = ...): ...
class _FakeSignal:
name: Any = ...
__doc__: Any = ...
def __init__(self, name: Any, doc: Any | None = ...) -> None: ...
send: Any = ...
connect: Any = ...
disconnect: Any = ...
has_receivers_for: Any = ...
receivers_for: Any = ...
temporarily_connected_to: Any = ...
connected_to: Any = ...
template_rendered: Any
before_render_template: Any
request_started: Any
request_finished: Any
request_tearing_down: Any
got_request_exception: Any
appcontext_tearing_down: Any
appcontext_pushed: Any
appcontext_popped: Any
message_flashed: Any

View File

@@ -1,16 +0,0 @@
from typing import Any, Iterable, Text
from jinja2 import BaseLoader, Environment as BaseEnvironment
class Environment(BaseEnvironment):
app: Any = ...
def __init__(self, app: Any, **options: Any) -> None: ...
class DispatchingJinjaLoader(BaseLoader):
app: Any = ...
def __init__(self, app: Any) -> None: ...
def get_source(self, environment: Any, template: Any): ...
def list_templates(self): ...
def render_template(template_name_or_list: Text | Iterable[Text], **context: Any) -> Text: ...
def render_template_string(source: Text, **context: Any) -> Text: ...

View File

@@ -1,56 +0,0 @@
from typing import IO, Any, Iterable, Mapping, Text, TypeVar
from click import BaseCommand
from click.testing import CliRunner, Result
from werkzeug.test import Client, EnvironBuilder as WerkzeugEnvironBuilder
# Response type for the client below.
# By default _R is Tuple[Iterable[Any], Text | int, werkzeug.datastructures.Headers], however
# most commonly it is wrapped in a Response object.
_R = TypeVar("_R")
class FlaskClient(Client[_R]):
preserve_context: bool = ...
environ_base: Any = ...
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
def session_transaction(self, *args: Any, **kwargs: Any) -> None: ...
def __enter__(self): ...
def __exit__(self, exc_type: Any, exc_value: Any, tb: Any) -> None: ...
class FlaskCliRunner(CliRunner):
app: Any = ...
def __init__(self, app: Any, **kwargs: Any) -> None: ...
def invoke(
self,
cli: BaseCommand | None = ...,
args: str | Iterable[str] | None = ...,
input: bytes | IO[Any] | Text | None = ...,
env: Mapping[str, str] | None = ...,
catch_exceptions: bool = ...,
color: bool = ...,
**extra: Any,
) -> Result: ...
class EnvironBuilder(WerkzeugEnvironBuilder):
app: Any
def __init__(
self,
app: Any,
path: str = ...,
base_url: Any | None = ...,
subdomain: Any | None = ...,
url_scheme: Any | None = ...,
*args: Any,
**kwargs: Any,
) -> None: ...
def json_dumps(self, obj: Any, **kwargs: Any) -> str: ...
def make_test_environ_builder(
app: Any,
path: str = ...,
base_url: Any | None = ...,
subdomain: Any | None = ...,
url_scheme: Any | None = ...,
*args: Any,
**kwargs: Any,
): ...

View File

@@ -1,17 +0,0 @@
from typing import Any
http_method_funcs: Any
class View:
methods: Any = ...
provide_automatic_options: Any = ...
decorators: Any = ...
def dispatch_request(self, *args: Any, **kwargs: Any) -> Any: ...
@classmethod
def as_view(cls, name: Any, *class_args: Any, **class_kwargs: Any): ...
class MethodViewType(type):
def __init__(self, name: Any, bases: Any, d: Any) -> None: ...
class MethodView(View, metaclass=MethodViewType):
def dispatch_request(self, *args: Any, **kwargs: Any) -> Any: ...

View File

@@ -1,32 +0,0 @@
from typing import Any
from werkzeug.exceptions import HTTPException
from werkzeug.routing import Rule
from werkzeug.wrappers import Request as RequestBase, Response as ResponseBase
class JSONMixin:
@property
def is_json(self) -> bool: ...
@property
def json(self): ...
def get_json(self, force: bool = ..., silent: bool = ..., cache: bool = ...): ...
def on_json_loading_failed(self, e: Any) -> None: ...
class Request(RequestBase, JSONMixin):
url_rule: Rule | None = ...
view_args: dict[str, Any] = ...
routing_exception: HTTPException | None = ...
# Request is making the max_content_length readonly, where it was not the
# case in its supertype.
# We would require something like https://github.com/python/typing/issues/241
@property
def max_content_length(self) -> int | None: ... # type: ignore[override]
@property
def endpoint(self) -> str | None: ...
@property
def blueprint(self) -> str | None: ...
class Response(ResponseBase, JSONMixin):
default_mimetype: str | None = ...
@property
def max_cookie_size(self) -> int: ...

View File

@@ -1,111 +0,0 @@
jinja2.Environment.__init__
jinja2.Environment.extract_translations
jinja2.Environment.handle_exception
jinja2.Environment.install_gettext_callables
jinja2.Environment.install_gettext_translations
jinja2.Environment.install_null_translations
jinja2.Environment.uninstall_gettext_translations
jinja2.Markup.__getslice__
jinja2.Markup.__mod__
jinja2.Markup.center
jinja2.Markup.ljust
jinja2.Markup.lstrip
jinja2.Markup.replace
jinja2.Markup.rjust
jinja2.Markup.rstrip
jinja2.Markup.strip
jinja2.Markup.translate
jinja2.Markup.zfill
jinja2.Template.__new__
jinja2.TemplateError.__unicode__
jinja2._compat.get_next
jinja2._stringdefs
jinja2.compiler.CodeGenerator.__init__
jinja2.compiler.CodeGenerator.binop
jinja2.compiler.CodeGenerator.export_assigned_vars
jinja2.compiler.CodeGenerator.function_scoping
jinja2.compiler.CodeGenerator.macro_body
jinja2.compiler.CodeGenerator.macro_def
jinja2.compiler.CodeGenerator.make_assignment_frame
jinja2.compiler.CodeGenerator.pop_scope
jinja2.compiler.CodeGenerator.pull_locals
jinja2.compiler.CodeGenerator.push_scope
jinja2.compiler.CodeGenerator.return_buffer_contents
jinja2.compiler.CodeGenerator.uaop
jinja2.compiler.CodeGenerator.unoptimize_scope
jinja2.compiler.Frame.__init__
jinja2.compiler.Frame.find_shadowed
jinja2.compiler.Frame.inner
jinja2.compiler.Frame.inspect
jinja2.compiler.FrameIdentifierVisitor
jinja2.compiler.Identifiers
jinja2.compiler.generate
jinja2.compiler.unoptimize_before_dead_code
jinja2.debug.ProcessedTraceback
jinja2.debug.TracebackFrameProxy
jinja2.debug.fake_exc_info
jinja2.debug.make_frame_proxy
jinja2.debug.make_traceback
jinja2.debug.raise_helper
jinja2.debug.tproxy
jinja2.debug.translate_exception
jinja2.debug.translate_syntax_error
jinja2.environment.Environment.__init__
jinja2.environment.Environment.extract_translations
jinja2.environment.Environment.handle_exception
jinja2.environment.Environment.install_gettext_callables
jinja2.environment.Environment.install_gettext_translations
jinja2.environment.Environment.install_null_translations
jinja2.environment.Environment.uninstall_gettext_translations
jinja2.environment.Template.__new__
jinja2.environment.TemplateModule.__init__
jinja2.environment.get_spontaneous_environment
jinja2.exceptions.TemplateError.__unicode__
jinja2.ext.ExtensionRegistry.__new__
jinja2.filters.do_dictsort
jinja2.filters.do_indent
jinja2.filters.do_random
jinja2.filters.do_trim
jinja2.filters.do_truncate
jinja2.filters.do_urlize
jinja2.filters.do_wordwrap
jinja2.filters.make_attrgetter
jinja2.meta.TrackingCodeGenerator.pull_locals
jinja2.optimizer.Optimizer.fold
jinja2.optimizer.Optimizer.visit_If
jinja2.parser.Parser.parse_add
jinja2.parser.Parser.parse_assign_target
jinja2.parser.Parser.parse_div
jinja2.parser.Parser.parse_floordiv
jinja2.parser.Parser.parse_mod
jinja2.parser.Parser.parse_mul
jinja2.parser.Parser.parse_sub
jinja2.runtime.Context.call
jinja2.runtime.LoopContext.__init__
jinja2.runtime.LoopContext.loop
jinja2.runtime.LoopContextIterator
jinja2.runtime.Macro.__init__
jinja2.runtime.Markup.__getslice__
jinja2.runtime.Markup.__mod__
jinja2.runtime.Markup.center
jinja2.runtime.Markup.ljust
jinja2.runtime.Markup.lstrip
jinja2.runtime.Markup.replace
jinja2.runtime.Markup.rjust
jinja2.runtime.Markup.rstrip
jinja2.runtime.Markup.strip
jinja2.runtime.Markup.translate
jinja2.runtime.Markup.zfill
jinja2.sandbox.SandboxedEnvironment.call
jinja2.tests.test_equalto
jinja2.utils.Markup.__getslice__
jinja2.utils.Markup.__mod__
jinja2.utils.Markup.center
jinja2.utils.Markup.ljust
jinja2.utils.Markup.lstrip
jinja2.utils.Markup.replace
jinja2.utils.Markup.rjust
jinja2.utils.Markup.rstrip
jinja2.utils.Markup.strip
jinja2.utils.Markup.translate
jinja2.utils.Markup.zfill

View File

@@ -1,4 +0,0 @@
version = "2.11.*"
python2 = true
requires = ["types-MarkupSafe"]
obsolete_since = "3.0"

View File

@@ -1,45 +0,0 @@
from jinja2.bccache import (
BytecodeCache as BytecodeCache,
FileSystemBytecodeCache as FileSystemBytecodeCache,
MemcachedBytecodeCache as MemcachedBytecodeCache,
)
from jinja2.environment import Environment as Environment, Template as Template
from jinja2.exceptions import (
TemplateAssertionError as TemplateAssertionError,
TemplateError as TemplateError,
TemplateNotFound as TemplateNotFound,
TemplatesNotFound as TemplatesNotFound,
TemplateSyntaxError as TemplateSyntaxError,
UndefinedError as UndefinedError,
)
from jinja2.filters import (
contextfilter as contextfilter,
environmentfilter as environmentfilter,
evalcontextfilter as evalcontextfilter,
)
from jinja2.loaders import (
BaseLoader as BaseLoader,
ChoiceLoader as ChoiceLoader,
DictLoader as DictLoader,
FileSystemLoader as FileSystemLoader,
FunctionLoader as FunctionLoader,
ModuleLoader as ModuleLoader,
PackageLoader as PackageLoader,
PrefixLoader as PrefixLoader,
)
from jinja2.runtime import (
DebugUndefined as DebugUndefined,
StrictUndefined as StrictUndefined,
Undefined as Undefined,
make_logging_undefined as make_logging_undefined,
)
from jinja2.utils import (
Markup as Markup,
clear_caches as clear_caches,
contextfunction as contextfunction,
environmentfunction as environmentfunction,
escape as escape,
evalcontextfunction as evalcontextfunction,
is_undefined as is_undefined,
select_autoescape as select_autoescape,
)

View File

@@ -1,36 +0,0 @@
import sys
from typing import Any
if sys.version_info >= (3,):
from urllib.parse import quote_from_bytes
url_quote = quote_from_bytes
else:
import urllib
url_quote = urllib.quote
PY2: Any
PYPY: Any
unichr: Any
range_type: Any
text_type: Any
string_types: Any
integer_types: Any
iterkeys: Any
itervalues: Any
iteritems: Any
NativeStringIO: Any
def reraise(tp, value, tb: Any | None = ...): ...
ifilter: Any
imap: Any
izip: Any
intern: Any
implements_iterator: Any
implements_to_string: Any
encode_filename: Any
get_next: Any
def with_metaclass(meta, *bases): ...

View File

@@ -1,40 +0,0 @@
from typing import Any
Cc: str
Cf: str
Cn: str
Co: str
Cs: Any
Ll: str
Lm: str
Lo: str
Lt: str
Lu: str
Mc: str
Me: str
Mn: str
Nd: str
Nl: str
No: str
Pc: str
Pd: str
Pe: str
Pf: str
Pi: str
Po: str
Ps: str
Sc: str
Sk: str
Sm: str
So: str
Zl: str
Zp: str
Zs: str
cats: Any
def combine(*args): ...
xid_start: str
xid_continue: str
def allexcept(*args): ...

View File

@@ -1,44 +0,0 @@
from typing import Any
marshal_dump: Any
marshal_load: Any
bc_version: int
bc_magic: Any
class Bucket:
environment: Any
key: Any
checksum: Any
def __init__(self, environment, key, checksum) -> None: ...
code: Any
def reset(self): ...
def load_bytecode(self, f): ...
def write_bytecode(self, f): ...
def bytecode_from_string(self, string): ...
def bytecode_to_string(self): ...
class BytecodeCache:
def load_bytecode(self, bucket): ...
def dump_bytecode(self, bucket): ...
def clear(self): ...
def get_cache_key(self, name, filename: Any | None = ...): ...
def get_source_checksum(self, source): ...
def get_bucket(self, environment, name, filename, source): ...
def set_bucket(self, bucket): ...
class FileSystemBytecodeCache(BytecodeCache):
directory: Any
pattern: Any
def __init__(self, directory: Any | None = ..., pattern: str = ...) -> None: ...
def load_bytecode(self, bucket): ...
def dump_bytecode(self, bucket): ...
def clear(self): ...
class MemcachedBytecodeCache(BytecodeCache):
client: Any
prefix: Any
timeout: Any
ignore_memcache_errors: Any
def __init__(self, client, prefix: str = ..., timeout: Any | None = ..., ignore_memcache_errors: bool = ...) -> None: ...
def load_bytecode(self, bucket): ...
def dump_bytecode(self, bucket): ...

View File

@@ -1,177 +0,0 @@
from keyword import iskeyword as is_python_keyword
from typing import Any
from jinja2.visitor import NodeVisitor
operators: Any
dict_item_iter: str
unoptimize_before_dead_code: bool
def generate(node, environment, name, filename, stream: Any | None = ..., defer_init: bool = ...): ...
def has_safe_repr(value): ...
def find_undeclared(nodes, names): ...
class Identifiers:
declared: Any
outer_undeclared: Any
undeclared: Any
declared_locally: Any
declared_parameter: Any
def __init__(self) -> None: ...
def add_special(self, name): ...
def is_declared(self, name): ...
def copy(self): ...
class Frame:
eval_ctx: Any
identifiers: Any
toplevel: bool
rootlevel: bool
require_output_check: Any
buffer: Any
block: Any
assigned_names: Any
parent: Any
def __init__(self, eval_ctx, parent: Any | None = ...) -> None: ...
def copy(self): ...
def inspect(self, nodes): ...
def find_shadowed(self, extra: Any = ...): ...
def inner(self): ...
def soft(self): ...
__copy__: Any
class VisitorExit(RuntimeError): ...
class DependencyFinderVisitor(NodeVisitor):
filters: Any
tests: Any
def __init__(self) -> None: ...
def visit_Filter(self, node): ...
def visit_Test(self, node): ...
def visit_Block(self, node): ...
class UndeclaredNameVisitor(NodeVisitor):
names: Any
undeclared: Any
def __init__(self, names) -> None: ...
def visit_Name(self, node): ...
def visit_Block(self, node): ...
class FrameIdentifierVisitor(NodeVisitor):
identifiers: Any
def __init__(self, identifiers) -> None: ...
def visit_Name(self, node): ...
def visit_If(self, node): ...
def visit_Macro(self, node): ...
def visit_Import(self, node): ...
def visit_FromImport(self, node): ...
def visit_Assign(self, node): ...
def visit_For(self, node): ...
def visit_CallBlock(self, node): ...
def visit_FilterBlock(self, node): ...
def visit_AssignBlock(self, node): ...
def visit_Scope(self, node): ...
def visit_Block(self, node): ...
class CompilerExit(Exception): ...
class CodeGenerator(NodeVisitor):
environment: Any
name: Any
filename: Any
stream: Any
created_block_context: bool
defer_init: Any
import_aliases: Any
blocks: Any
extends_so_far: int
has_known_extends: bool
code_lineno: int
tests: Any
filters: Any
debug_info: Any
def __init__(self, environment, name, filename, stream: Any | None = ..., defer_init: bool = ...) -> None: ...
def fail(self, msg, lineno): ...
def temporary_identifier(self): ...
def buffer(self, frame): ...
def return_buffer_contents(self, frame): ...
def indent(self): ...
def outdent(self, step: int = ...): ...
def start_write(self, frame, node: Any | None = ...): ...
def end_write(self, frame): ...
def simple_write(self, s, frame, node: Any | None = ...): ...
def blockvisit(self, nodes, frame): ...
def write(self, x): ...
def writeline(self, x, node: Any | None = ..., extra: int = ...): ...
def newline(self, node: Any | None = ..., extra: int = ...): ...
def signature(self, node, frame, extra_kwargs: Any | None = ...): ...
def pull_locals(self, frame): ...
def pull_dependencies(self, nodes): ...
def unoptimize_scope(self, frame): ...
def push_scope(self, frame, extra_vars: Any = ...): ...
def pop_scope(self, aliases, frame): ...
def function_scoping(self, node, frame, children: Any | None = ..., find_special: bool = ...): ...
def macro_body(self, node, frame, children: Any | None = ...): ...
def macro_def(self, node, frame): ...
def position(self, node): ...
def visit_Template(self, node, frame: Any | None = ...): ...
def visit_Block(self, node, frame): ...
def visit_Extends(self, node, frame): ...
def visit_Include(self, node, frame): ...
def visit_Import(self, node, frame): ...
def visit_FromImport(self, node, frame): ...
def visit_For(self, node, frame): ...
def visit_If(self, node, frame): ...
def visit_Macro(self, node, frame): ...
def visit_CallBlock(self, node, frame): ...
def visit_FilterBlock(self, node, frame): ...
def visit_ExprStmt(self, node, frame): ...
def visit_Output(self, node, frame): ...
def make_assignment_frame(self, frame): ...
def export_assigned_vars(self, frame, assignment_frame): ...
def visit_Assign(self, node, frame): ...
def visit_AssignBlock(self, node, frame): ...
def visit_Name(self, node, frame): ...
def visit_Const(self, node, frame): ...
def visit_TemplateData(self, node, frame): ...
def visit_Tuple(self, node, frame): ...
def visit_List(self, node, frame): ...
def visit_Dict(self, node, frame): ...
def binop(self, interceptable: bool = ...): ...
def uaop(self, interceptable: bool = ...): ...
visit_Add: Any
visit_Sub: Any
visit_Mul: Any
visit_Div: Any
visit_FloorDiv: Any
visit_Pow: Any
visit_Mod: Any
visit_And: Any
visit_Or: Any
visit_Pos: Any
visit_Neg: Any
visit_Not: Any
def visit_Concat(self, node, frame): ...
def visit_Compare(self, node, frame): ...
def visit_Operand(self, node, frame): ...
def visit_Getattr(self, node, frame): ...
def visit_Getitem(self, node, frame): ...
def visit_Slice(self, node, frame): ...
def visit_Filter(self, node, frame): ...
def visit_Test(self, node, frame): ...
def visit_CondExpr(self, node, frame): ...
def visit_Call(self, node, frame, forward_caller: bool = ...): ...
def visit_Keyword(self, node, frame): ...
def visit_MarkSafe(self, node, frame): ...
def visit_MarkSafeIfAutoescape(self, node, frame): ...
def visit_EnvironmentAttribute(self, node, frame): ...
def visit_ExtensionAttribute(self, node, frame): ...
def visit_ImportedName(self, node, frame): ...
def visit_InternalName(self, node, frame): ...
def visit_ContextReference(self, node, frame): ...
def visit_Continue(self, node, frame): ...
def visit_Break(self, node, frame): ...
def visit_Scope(self, node, frame): ...
def visit_EvalContextModifier(self, node, frame): ...
def visit_ScopedEvalContextModifier(self, node, frame): ...

View File

@@ -1 +0,0 @@
LOREM_IPSUM_WORDS: str

View File

@@ -1,37 +0,0 @@
from typing import Any
tproxy: Any
raise_helper: str
class TracebackFrameProxy:
tb: Any
def __init__(self, tb) -> None: ...
@property
def tb_next(self): ...
def set_next(self, next): ...
@property
def is_jinja_frame(self): ...
def __getattr__(self, name): ...
def make_frame_proxy(frame): ...
class ProcessedTraceback:
exc_type: Any
exc_value: Any
frames: Any
def __init__(self, exc_type, exc_value, frames) -> None: ...
def render_as_text(self, limit: Any | None = ...): ...
def render_as_html(self, full: bool = ...): ...
@property
def is_template_syntax_error(self): ...
@property
def exc_info(self): ...
@property
def standard_exc_info(self): ...
def make_traceback(exc_info, source_hint: Any | None = ...): ...
def translate_syntax_error(error, source: Any | None = ...): ...
def translate_exception(exc_info, initial_skip: int = ...): ...
def fake_exc_info(exc_info, filename, lineno): ...
tb_set_next: Any

View File

@@ -1,22 +0,0 @@
from typing import Any, Dict
from jinja2.filters import FILTERS
from jinja2.tests import TESTS
DEFAULT_FILTERS = FILTERS
DEFAULT_TESTS = TESTS
BLOCK_START_STRING: str
BLOCK_END_STRING: str
VARIABLE_START_STRING: str
VARIABLE_END_STRING: str
COMMENT_START_STRING: str
COMMENT_END_STRING: str
LINE_STATEMENT_PREFIX: str | None
LINE_COMMENT_PREFIX: str | None
TRIM_BLOCKS: bool
LSTRIP_BLOCKS: bool
NEWLINE_SEQUENCE: str
KEEP_TRAILING_NEWLINE: bool
DEFAULT_NAMESPACE: dict[str, Any]
DEFAULT_POLICIES = Dict[str, Any]

View File

@@ -1,214 +0,0 @@
import sys
from typing import Any, Callable, Iterator, Sequence, Text, Type
from .bccache import BytecodeCache
from .loaders import BaseLoader
from .runtime import Context, Undefined
if sys.version_info >= (3, 6):
from typing import AsyncIterator, Awaitable
def get_spontaneous_environment(*args): ...
def create_cache(size): ...
def copy_cache(cache): ...
def load_extensions(environment, extensions): ...
class Environment:
sandboxed: bool
overlayed: bool
linked_to: Any
shared: bool
exception_handler: Any
exception_formatter: Any
code_generator_class: Any
context_class: Any
block_start_string: Text
block_end_string: Text
variable_start_string: Text
variable_end_string: Text
comment_start_string: Text
comment_end_string: Text
line_statement_prefix: Text
line_comment_prefix: Text
trim_blocks: bool
lstrip_blocks: Any
newline_sequence: Text
keep_trailing_newline: bool
undefined: Type[Undefined]
optimized: bool
finalize: Callable[..., Any]
autoescape: Any
filters: Any
tests: Any
globals: dict[str, Any]
loader: BaseLoader
cache: Any
bytecode_cache: BytecodeCache
auto_reload: bool
extensions: list[Any]
def __init__(
self,
block_start_string: Text = ...,
block_end_string: Text = ...,
variable_start_string: Text = ...,
variable_end_string: Text = ...,
comment_start_string: Any = ...,
comment_end_string: Text = ...,
line_statement_prefix: Text = ...,
line_comment_prefix: Text = ...,
trim_blocks: bool = ...,
lstrip_blocks: bool = ...,
newline_sequence: Text = ...,
keep_trailing_newline: bool = ...,
extensions: list[Any] = ...,
optimized: bool = ...,
undefined: Type[Undefined] = ...,
finalize: Callable[..., Any] | None = ...,
autoescape: bool | Callable[[str], bool] = ...,
loader: BaseLoader | None = ...,
cache_size: int = ...,
auto_reload: bool = ...,
bytecode_cache: BytecodeCache | None = ...,
enable_async: bool = ...,
) -> None: ...
def add_extension(self, extension): ...
def extend(self, **attributes): ...
def overlay(
self,
block_start_string: Text = ...,
block_end_string: Text = ...,
variable_start_string: Text = ...,
variable_end_string: Text = ...,
comment_start_string: Any = ...,
comment_end_string: Text = ...,
line_statement_prefix: Text = ...,
line_comment_prefix: Text = ...,
trim_blocks: bool = ...,
lstrip_blocks: bool = ...,
extensions: list[Any] = ...,
optimized: bool = ...,
undefined: Type[Undefined] = ...,
finalize: Callable[..., Any] = ...,
autoescape: bool = ...,
loader: BaseLoader | None = ...,
cache_size: int = ...,
auto_reload: bool = ...,
bytecode_cache: BytecodeCache | None = ...,
): ...
lexer: Any
def iter_extensions(self): ...
def getitem(self, obj, argument): ...
def getattr(self, obj, attribute): ...
def call_filter(
self, name, value, args: Any | None = ..., kwargs: Any | None = ..., context: Any | None = ..., eval_ctx: Any | None = ...
): ...
def call_test(self, name, value, args: Any | None = ..., kwargs: Any | None = ...): ...
def parse(self, source, name: Any | None = ..., filename: Any | None = ...): ...
def lex(self, source, name: Any | None = ..., filename: Any | None = ...): ...
def preprocess(self, source: Text, name: Any | None = ..., filename: Any | None = ...): ...
def compile(self, source, name: Any | None = ..., filename: Any | None = ..., raw: bool = ..., defer_init: bool = ...): ...
def compile_expression(self, source: Text, undefined_to_none: bool = ...): ...
def compile_templates(
self,
target,
extensions: Any | None = ...,
filter_func: Any | None = ...,
zip: str = ...,
log_function: Any | None = ...,
ignore_errors: bool = ...,
py_compile: bool = ...,
): ...
def list_templates(self, extensions: Any | None = ..., filter_func: Any | None = ...): ...
def handle_exception(self, exc_info: Any | None = ..., rendered: bool = ..., source_hint: Any | None = ...): ...
def join_path(self, template: Template | Text, parent: Text) -> Text: ...
def get_template(self, name: Template | Text, parent: Text | None = ..., globals: Any | None = ...) -> Template: ...
def select_template(
self, names: Sequence[Template | Text], parent: Text | None = ..., globals: dict[str, Any] | None = ...
) -> Template: ...
def get_or_select_template(
self,
template_name_or_list: Template | Text | Sequence[Template | Text],
parent: Text | None = ...,
globals: dict[str, Any] | None = ...,
) -> Template: ...
def from_string(
self, source: Text, globals: dict[str, Any] | None = ..., template_class: Type[Template] | None = ...
) -> Template: ...
def make_globals(self, d: dict[str, Any] | None) -> dict[str, Any]: ...
# Frequently added extensions are included here:
# from InternationalizationExtension:
def install_gettext_translations(self, translations: Any, newstyle: bool | None = ...): ...
def install_null_translations(self, newstyle: bool | None = ...): ...
def install_gettext_callables(
self, gettext: Callable[..., Any], ngettext: Callable[..., Any], newstyle: bool | None = ...
): ...
def uninstall_gettext_translations(self, translations: Any): ...
def extract_translations(self, source: Any, gettext_functions: Any): ...
newstyle_gettext: bool
class Template:
name: str | None
filename: str | None
def __new__(
cls,
source,
block_start_string: Any = ...,
block_end_string: Any = ...,
variable_start_string: Any = ...,
variable_end_string: Any = ...,
comment_start_string: Any = ...,
comment_end_string: Any = ...,
line_statement_prefix: Any = ...,
line_comment_prefix: Any = ...,
trim_blocks: Any = ...,
lstrip_blocks: Any = ...,
newline_sequence: Any = ...,
keep_trailing_newline: Any = ...,
extensions: Any = ...,
optimized: bool = ...,
undefined: Any = ...,
finalize: Any | None = ...,
autoescape: bool = ...,
): ...
environment: Environment = ...
@classmethod
def from_code(cls, environment, code, globals, uptodate: Any | None = ...): ...
@classmethod
def from_module_dict(cls, environment, module_dict, globals): ...
def render(self, *args, **kwargs) -> Text: ...
def stream(self, *args, **kwargs) -> TemplateStream: ...
def generate(self, *args, **kwargs) -> Iterator[Text]: ...
def new_context(
self, vars: dict[str, Any] | None = ..., shared: bool = ..., locals: dict[str, Any] | None = ...
) -> Context: ...
def make_module(
self, vars: dict[str, Any] | None = ..., shared: bool = ..., locals: dict[str, Any] | None = ...
) -> Context: ...
@property
def module(self) -> Any: ...
def get_corresponding_lineno(self, lineno): ...
@property
def is_up_to_date(self) -> bool: ...
@property
def debug_info(self): ...
if sys.version_info >= (3, 6):
def render_async(self, *args, **kwargs) -> Awaitable[Text]: ...
def generate_async(self, *args, **kwargs) -> AsyncIterator[Text]: ...
class TemplateModule:
__name__: Any
def __init__(self, template, context) -> None: ...
def __html__(self): ...
class TemplateExpression:
def __init__(self, template, undefined_to_none) -> None: ...
def __call__(self, *args, **kwargs): ...
class TemplateStream:
def __init__(self, gen) -> None: ...
def dump(self, fp, encoding: Text | None = ..., errors: Text = ...): ...
buffered: bool
def disable_buffering(self) -> None: ...
def enable_buffering(self, size: int = ...) -> None: ...
def __iter__(self): ...
def __next__(self): ...

View File

@@ -1,31 +0,0 @@
from typing import Any, Text
class TemplateError(Exception):
def __init__(self, message: Text | None = ...) -> None: ...
@property
def message(self): ...
def __unicode__(self): ...
class TemplateNotFound(IOError, LookupError, TemplateError):
message: Any
name: Any
templates: Any
def __init__(self, name, message: Text | None = ...) -> None: ...
class TemplatesNotFound(TemplateNotFound):
templates: Any
def __init__(self, names: Any = ..., message: Text | None = ...) -> None: ...
class TemplateSyntaxError(TemplateError):
lineno: int
name: Text
filename: Text
source: Text
translated: bool
def __init__(self, message: Text, lineno: int, name: Text | None = ..., filename: Text | None = ...) -> None: ...
class TemplateAssertionError(TemplateSyntaxError): ...
class TemplateRuntimeError(TemplateError): ...
class UndefinedError(TemplateRuntimeError): ...
class SecurityError(TemplateRuntimeError): ...
class FilterArgumentError(TemplateRuntimeError): ...

View File

@@ -1,66 +0,0 @@
from typing import Any
GETTEXT_FUNCTIONS: Any
class ExtensionRegistry(type):
def __new__(cls, name, bases, d): ...
class Extension:
tags: Any
priority: int
environment: Any
def __init__(self, environment) -> None: ...
def bind(self, environment): ...
def preprocess(self, source, name, filename: Any | None = ...): ...
def filter_stream(self, stream): ...
def parse(self, parser): ...
def attr(self, name, lineno: Any | None = ...): ...
def call_method(
self,
name,
args: Any | None = ...,
kwargs: Any | None = ...,
dyn_args: Any | None = ...,
dyn_kwargs: Any | None = ...,
lineno: Any | None = ...,
): ...
class InternationalizationExtension(Extension):
tags: Any
def __init__(self, environment) -> None: ...
def parse(self, parser): ...
class ExprStmtExtension(Extension):
tags: Any
def parse(self, parser): ...
class LoopControlExtension(Extension):
tags: Any
def parse(self, parser): ...
class WithExtension(Extension):
tags: Any
def parse(self, parser): ...
class AutoEscapeExtension(Extension):
tags: Any
def parse(self, parser): ...
def extract_from_ast(node, gettext_functions: Any = ..., babel_style: bool = ...): ...
class _CommentFinder:
tokens: Any
comment_tags: Any
offset: int
last_lineno: int
def __init__(self, tokens, comment_tags) -> None: ...
def find_backwards(self, offset): ...
def find_comments(self, lineno): ...
def babel_extract(fileobj, keywords, comment_tags, options): ...
i18n: Any
do: Any
loopcontrols: Any
with_: Any
autoescape: Any

View File

@@ -1,56 +0,0 @@
from typing import Any, NamedTuple
def contextfilter(f): ...
def evalcontextfilter(f): ...
def environmentfilter(f): ...
def make_attrgetter(environment, attribute): ...
def do_forceescape(value): ...
def do_urlencode(value): ...
def do_replace(eval_ctx, s, old, new, count: Any | None = ...): ...
def do_upper(s): ...
def do_lower(s): ...
def do_xmlattr(_eval_ctx, d, autospace: bool = ...): ...
def do_capitalize(s): ...
def do_title(s): ...
def do_dictsort(value, case_sensitive: bool = ..., by: str = ...): ...
def do_sort(environment, value, reverse: bool = ..., case_sensitive: bool = ..., attribute: Any | None = ...): ...
def do_default(value, default_value: str = ..., boolean: bool = ...): ...
def do_join(eval_ctx, value, d: str = ..., attribute: Any | None = ...): ...
def do_center(value, width: int = ...): ...
def do_first(environment, seq): ...
def do_last(environment, seq): ...
def do_random(environment, seq): ...
def do_filesizeformat(value, binary: bool = ...): ...
def do_pprint(value, verbose: bool = ...): ...
def do_urlize(eval_ctx, value, trim_url_limit: Any | None = ..., nofollow: bool = ..., target: Any | None = ...): ...
def do_indent(s, width: int = ..., indentfirst: bool = ...): ...
def do_truncate(s, length: int = ..., killwords: bool = ..., end: str = ...): ...
def do_wordwrap(environment, s, width: int = ..., break_long_words: bool = ..., wrapstring: Any | None = ...): ...
def do_wordcount(s): ...
def do_int(value, default: int = ..., base: int = ...): ...
def do_float(value, default: float = ...): ...
def do_format(value, *args, **kwargs): ...
def do_trim(value): ...
def do_striptags(value): ...
def do_slice(value, slices, fill_with: Any | None = ...): ...
def do_batch(value, linecount, fill_with: Any | None = ...): ...
def do_round(value, precision: int = ..., method: str = ...): ...
def do_groupby(environment, value, attribute): ...
class _GroupTuple(NamedTuple):
grouper: Any
list: Any
def do_sum(environment, iterable, attribute: Any | None = ..., start: int = ...): ...
def do_list(value): ...
def do_mark_safe(value): ...
def do_mark_unsafe(value): ...
def do_reverse(value): ...
def do_attr(environment, obj, name): ...
def do_map(*args, **kwargs): ...
def do_select(*args, **kwargs): ...
def do_reject(*args, **kwargs): ...
def do_selectattr(*args, **kwargs): ...
def do_rejectattr(*args, **kwargs): ...
FILTERS: Any

View File

@@ -1,117 +0,0 @@
from typing import Any, Tuple
whitespace_re: Any
string_re: Any
integer_re: Any
name_re: Any
float_re: Any
newline_re: Any
TOKEN_ADD: Any
TOKEN_ASSIGN: Any
TOKEN_COLON: Any
TOKEN_COMMA: Any
TOKEN_DIV: Any
TOKEN_DOT: Any
TOKEN_EQ: Any
TOKEN_FLOORDIV: Any
TOKEN_GT: Any
TOKEN_GTEQ: Any
TOKEN_LBRACE: Any
TOKEN_LBRACKET: Any
TOKEN_LPAREN: Any
TOKEN_LT: Any
TOKEN_LTEQ: Any
TOKEN_MOD: Any
TOKEN_MUL: Any
TOKEN_NE: Any
TOKEN_PIPE: Any
TOKEN_POW: Any
TOKEN_RBRACE: Any
TOKEN_RBRACKET: Any
TOKEN_RPAREN: Any
TOKEN_SEMICOLON: Any
TOKEN_SUB: Any
TOKEN_TILDE: Any
TOKEN_WHITESPACE: Any
TOKEN_FLOAT: Any
TOKEN_INTEGER: Any
TOKEN_NAME: Any
TOKEN_STRING: Any
TOKEN_OPERATOR: Any
TOKEN_BLOCK_BEGIN: Any
TOKEN_BLOCK_END: Any
TOKEN_VARIABLE_BEGIN: Any
TOKEN_VARIABLE_END: Any
TOKEN_RAW_BEGIN: Any
TOKEN_RAW_END: Any
TOKEN_COMMENT_BEGIN: Any
TOKEN_COMMENT_END: Any
TOKEN_COMMENT: Any
TOKEN_LINESTATEMENT_BEGIN: Any
TOKEN_LINESTATEMENT_END: Any
TOKEN_LINECOMMENT_BEGIN: Any
TOKEN_LINECOMMENT_END: Any
TOKEN_LINECOMMENT: Any
TOKEN_DATA: Any
TOKEN_INITIAL: Any
TOKEN_EOF: Any
operators: Any
reverse_operators: Any
operator_re: Any
ignored_tokens: Any
ignore_if_empty: Any
def describe_token(token): ...
def describe_token_expr(expr): ...
def count_newlines(value): ...
def compile_rules(environment): ...
class Failure:
message: Any
error_class: Any
def __init__(self, message, cls: Any = ...) -> None: ...
def __call__(self, lineno, filename): ...
class Token(Tuple[int, Any, Any]):
lineno: Any
type: Any
value: Any
def __new__(cls, lineno, type, value): ...
def test(self, expr): ...
def test_any(self, *iterable): ...
class TokenStreamIterator:
stream: Any
def __init__(self, stream) -> None: ...
def __iter__(self): ...
def __next__(self): ...
class TokenStream:
name: Any
filename: Any
closed: bool
current: Any
def __init__(self, generator, name, filename) -> None: ...
def __iter__(self): ...
def __bool__(self): ...
__nonzero__: Any
eos: Any
def push(self, token): ...
def look(self): ...
def skip(self, n: int = ...): ...
def next_if(self, expr): ...
def skip_if(self, expr): ...
def __next__(self): ...
def close(self): ...
def expect(self, expr): ...
def get_lexer(environment): ...
class Lexer:
newline_sequence: Any
keep_trailing_newline: Any
rules: Any
def __init__(self, environment) -> None: ...
def tokenize(self, source, name: Any | None = ..., filename: Any | None = ..., state: Any | None = ...): ...
def wrap(self, stream, name: Any | None = ..., filename: Any | None = ...): ...
def tokeniter(self, source, name, filename: Any | None = ..., state: Any | None = ...): ...

View File

@@ -1,78 +0,0 @@
import sys
from types import ModuleType
from typing import Any, Callable, Iterable, Text, Union
from .environment import Environment
if sys.version_info >= (3, 7):
from os import PathLike
_SearchPath = Union[Text, PathLike[str], Iterable[Union[Text, PathLike[str]]]]
else:
_SearchPath = Union[Text, Iterable[Text]]
def split_template_path(template: Text) -> list[Text]: ...
class BaseLoader:
has_source_access: bool
def get_source(self, environment, template): ...
def list_templates(self): ...
def load(self, environment, name, globals: Any | None = ...): ...
class FileSystemLoader(BaseLoader):
searchpath: Text
encoding: Any
followlinks: Any
def __init__(self, searchpath: _SearchPath, encoding: Text = ..., followlinks: bool = ...) -> None: ...
def get_source(self, environment: Environment, template: Text) -> tuple[Text, Text, Callable[..., Any]]: ...
def list_templates(self): ...
class PackageLoader(BaseLoader):
encoding: Text
manager: Any
filesystem_bound: Any
provider: Any
package_path: Any
def __init__(self, package_name: Text, package_path: Text = ..., encoding: Text = ...) -> None: ...
def get_source(self, environment: Environment, template: Text) -> tuple[Text, Text, Callable[..., Any]]: ...
def list_templates(self): ...
class DictLoader(BaseLoader):
mapping: Any
def __init__(self, mapping) -> None: ...
def get_source(self, environment: Environment, template: Text) -> tuple[Text, Text, Callable[..., Any]]: ...
def list_templates(self): ...
class FunctionLoader(BaseLoader):
load_func: Any
def __init__(self, load_func) -> None: ...
def get_source(self, environment: Environment, template: Text) -> tuple[Text, Text | None, Callable[..., Any] | None]: ...
class PrefixLoader(BaseLoader):
mapping: Any
delimiter: Any
def __init__(self, mapping, delimiter: str = ...) -> None: ...
def get_loader(self, template): ...
def get_source(self, environment: Environment, template: Text) -> tuple[Text, Text, Callable[..., Any]]: ...
def load(self, environment, name, globals: Any | None = ...): ...
def list_templates(self): ...
class ChoiceLoader(BaseLoader):
loaders: Any
def __init__(self, loaders) -> None: ...
def get_source(self, environment: Environment, template: Text) -> tuple[Text, Text, Callable[..., Any]]: ...
def load(self, environment, name, globals: Any | None = ...): ...
def list_templates(self): ...
class _TemplateModule(ModuleType): ...
class ModuleLoader(BaseLoader):
has_source_access: bool
module: Any
package_name: Any
def __init__(self, path) -> None: ...
@staticmethod
def get_template_key(name): ...
@staticmethod
def get_module_filename(name): ...
def load(self, environment, name, globals: Any | None = ...): ...

View File

@@ -1,12 +0,0 @@
from typing import Any
from jinja2.compiler import CodeGenerator
class TrackingCodeGenerator(CodeGenerator):
undeclared_identifiers: Any
def __init__(self, environment) -> None: ...
def write(self, x): ...
def pull_locals(self, frame): ...
def find_undeclared_variables(ast): ...
def find_referenced_templates(ast): ...

View File

@@ -1,254 +0,0 @@
from typing import Any
class Impossible(Exception): ...
class NodeType(type):
def __new__(cls, name, bases, d): ...
class EvalContext:
environment: Any
autoescape: Any
volatile: bool
def __init__(self, environment, template_name: Any | None = ...) -> None: ...
def save(self): ...
def revert(self, old): ...
def get_eval_context(node, ctx): ...
class Node:
fields: Any
attributes: Any
abstract: bool
def __init__(self, *fields, **attributes) -> None: ...
def iter_fields(self, exclude: Any | None = ..., only: Any | None = ...): ...
def iter_child_nodes(self, exclude: Any | None = ..., only: Any | None = ...): ...
def find(self, node_type): ...
def find_all(self, node_type): ...
def set_ctx(self, ctx): ...
def set_lineno(self, lineno, override: bool = ...): ...
def set_environment(self, environment): ...
def __eq__(self, other): ...
def __ne__(self, other): ...
__hash__: Any
class Stmt(Node):
abstract: bool
class Helper(Node):
abstract: bool
class Template(Node):
fields: Any
class Output(Stmt):
fields: Any
class Extends(Stmt):
fields: Any
class For(Stmt):
fields: Any
class If(Stmt):
fields: Any
class Macro(Stmt):
fields: Any
name: str
args: list[Any]
defaults: list[Any]
body: list[Any]
class CallBlock(Stmt):
fields: Any
class FilterBlock(Stmt):
fields: Any
class Block(Stmt):
fields: Any
class Include(Stmt):
fields: Any
class Import(Stmt):
fields: Any
class FromImport(Stmt):
fields: Any
class ExprStmt(Stmt):
fields: Any
class Assign(Stmt):
fields: Any
class AssignBlock(Stmt):
fields: Any
class Expr(Node):
abstract: bool
def as_const(self, eval_ctx: Any | None = ...): ...
def can_assign(self): ...
class BinExpr(Expr):
fields: Any
operator: Any
abstract: bool
def as_const(self, eval_ctx: Any | None = ...): ...
class UnaryExpr(Expr):
fields: Any
operator: Any
abstract: bool
def as_const(self, eval_ctx: Any | None = ...): ...
class Name(Expr):
fields: Any
def can_assign(self): ...
class Literal(Expr):
abstract: bool
class Const(Literal):
fields: Any
def as_const(self, eval_ctx: Any | None = ...): ...
@classmethod
def from_untrusted(cls, value, lineno: Any | None = ..., environment: Any | None = ...): ...
class TemplateData(Literal):
fields: Any
def as_const(self, eval_ctx: Any | None = ...): ...
class Tuple(Literal):
fields: Any
def as_const(self, eval_ctx: Any | None = ...): ...
def can_assign(self): ...
class List(Literal):
fields: Any
def as_const(self, eval_ctx: Any | None = ...): ...
class Dict(Literal):
fields: Any
def as_const(self, eval_ctx: Any | None = ...): ...
class Pair(Helper):
fields: Any
def as_const(self, eval_ctx: Any | None = ...): ...
class Keyword(Helper):
fields: Any
def as_const(self, eval_ctx: Any | None = ...): ...
class CondExpr(Expr):
fields: Any
def as_const(self, eval_ctx: Any | None = ...): ...
class Filter(Expr):
fields: Any
def as_const(self, eval_ctx: Any | None = ...): ...
class Test(Expr):
fields: Any
class Call(Expr):
fields: Any
def as_const(self, eval_ctx: Any | None = ...): ...
class Getitem(Expr):
fields: Any
def as_const(self, eval_ctx: Any | None = ...): ...
def can_assign(self): ...
class Getattr(Expr):
fields: Any
def as_const(self, eval_ctx: Any | None = ...): ...
def can_assign(self): ...
class Slice(Expr):
fields: Any
def as_const(self, eval_ctx: Any | None = ...): ...
class Concat(Expr):
fields: Any
def as_const(self, eval_ctx: Any | None = ...): ...
class Compare(Expr):
fields: Any
def as_const(self, eval_ctx: Any | None = ...): ...
class Operand(Helper):
fields: Any
class Mul(BinExpr):
operator: str
class Div(BinExpr):
operator: str
class FloorDiv(BinExpr):
operator: str
class Add(BinExpr):
operator: str
class Sub(BinExpr):
operator: str
class Mod(BinExpr):
operator: str
class Pow(BinExpr):
operator: str
class And(BinExpr):
operator: str
def as_const(self, eval_ctx: Any | None = ...): ...
class Or(BinExpr):
operator: str
def as_const(self, eval_ctx: Any | None = ...): ...
class Not(UnaryExpr):
operator: str
class Neg(UnaryExpr):
operator: str
class Pos(UnaryExpr):
operator: str
class EnvironmentAttribute(Expr):
fields: Any
class ExtensionAttribute(Expr):
fields: Any
class ImportedName(Expr):
fields: Any
class InternalName(Expr):
fields: Any
def __init__(self) -> None: ...
class MarkSafe(Expr):
fields: Any
def as_const(self, eval_ctx: Any | None = ...): ...
class MarkSafeIfAutoescape(Expr):
fields: Any
def as_const(self, eval_ctx: Any | None = ...): ...
class ContextReference(Expr): ...
class Continue(Stmt): ...
class Break(Stmt): ...
class Scope(Stmt):
fields: Any
class EvalContextModifier(Stmt):
fields: Any
class ScopedEvalContextModifier(EvalContextModifier):
fields: Any

View File

@@ -1,30 +0,0 @@
from typing import Any
from jinja2.visitor import NodeTransformer
def optimize(node, environment): ...
class Optimizer(NodeTransformer):
environment: Any
def __init__(self, environment) -> None: ...
def visit_If(self, node): ...
def fold(self, node): ...
visit_Add: Any
visit_Sub: Any
visit_Mul: Any
visit_Div: Any
visit_FloorDiv: Any
visit_Pow: Any
visit_Mod: Any
visit_And: Any
visit_Or: Any
visit_Pos: Any
visit_Neg: Any
visit_Not: Any
visit_Compare: Any
visit_Getitem: Any
visit_Getattr: Any
visit_Call: Any
visit_Filter: Any
visit_Test: Any
visit_CondExpr: Any

View File

@@ -1,68 +0,0 @@
from typing import Any
class Parser:
environment: Any
stream: Any
name: Any
filename: Any
closed: bool
extensions: Any
def __init__(
self, environment, source, name: Any | None = ..., filename: Any | None = ..., state: Any | None = ...
) -> None: ...
def fail(self, msg, lineno: Any | None = ..., exc: Any = ...): ...
def fail_unknown_tag(self, name, lineno: Any | None = ...): ...
def fail_eof(self, end_tokens: Any | None = ..., lineno: Any | None = ...): ...
def is_tuple_end(self, extra_end_rules: Any | None = ...): ...
def free_identifier(self, lineno: Any | None = ...): ...
def parse_statement(self): ...
def parse_statements(self, end_tokens, drop_needle: bool = ...): ...
def parse_set(self): ...
def parse_for(self): ...
def parse_if(self): ...
def parse_block(self): ...
def parse_extends(self): ...
def parse_import_context(self, node, default): ...
def parse_include(self): ...
def parse_import(self): ...
def parse_from(self): ...
def parse_signature(self, node): ...
def parse_call_block(self): ...
def parse_filter_block(self): ...
def parse_macro(self): ...
def parse_print(self): ...
def parse_assign_target(self, with_tuple: bool = ..., name_only: bool = ..., extra_end_rules: Any | None = ...): ...
def parse_expression(self, with_condexpr: bool = ...): ...
def parse_condexpr(self): ...
def parse_or(self): ...
def parse_and(self): ...
def parse_not(self): ...
def parse_compare(self): ...
def parse_add(self): ...
def parse_sub(self): ...
def parse_concat(self): ...
def parse_mul(self): ...
def parse_div(self): ...
def parse_floordiv(self): ...
def parse_mod(self): ...
def parse_pow(self): ...
def parse_unary(self, with_filter: bool = ...): ...
def parse_primary(self): ...
def parse_tuple(
self,
simplified: bool = ...,
with_condexpr: bool = ...,
extra_end_rules: Any | None = ...,
explicit_parentheses: bool = ...,
): ...
def parse_list(self): ...
def parse_dict(self): ...
def parse_postfix(self, node): ...
def parse_filter_expr(self, node): ...
def parse_subscript(self, node): ...
def parse_subscribed(self): ...
def parse_call(self, node): ...
def parse_filter(self, node, start_inline: bool = ...): ...
def parse_test(self, node): ...
def subparse(self, end_tokens: Any | None = ...): ...
def parse(self): ...

View File

@@ -1,132 +0,0 @@
from typing import Any, Text
from jinja2.environment import Environment
from jinja2.exceptions import TemplateNotFound as TemplateNotFound, TemplateRuntimeError as TemplateRuntimeError
from jinja2.utils import Markup as Markup, concat as concat, escape as escape, missing as missing
to_string: Any
identity: Any
def markup_join(seq): ...
def unicode_join(seq): ...
class TemplateReference:
def __init__(self, context) -> None: ...
def __getitem__(self, name): ...
class Context:
parent: Context | dict[str, Any]
vars: dict[str, Any]
environment: Environment
eval_ctx: Any
exported_vars: Any
name: Text
blocks: dict[str, Any]
def __init__(
self, environment: Environment, parent: Context | dict[str, Any], name: Text, blocks: dict[str, Any]
) -> None: ...
def super(self, name, current): ...
def get(self, key, default: Any | None = ...): ...
def resolve(self, key): ...
def get_exported(self): ...
def get_all(self): ...
def call(__self, __obj, *args, **kwargs): ...
def derived(self, locals: Any | None = ...): ...
keys: Any
values: Any
items: Any
iterkeys: Any
itervalues: Any
iteritems: Any
def __contains__(self, name): ...
def __getitem__(self, key): ...
class BlockReference:
name: Any
def __init__(self, name, context, stack, depth) -> None: ...
@property
def super(self): ...
def __call__(self): ...
class LoopContext:
index0: int
depth0: Any
def __init__(self, iterable, recurse: Any | None = ..., depth0: int = ...) -> None: ...
def cycle(self, *args): ...
first: Any
last: Any
index: Any
revindex: Any
revindex0: Any
depth: Any
def __len__(self): ...
def __iter__(self): ...
def loop(self, iterable): ...
__call__: Any
@property
def length(self): ...
class LoopContextIterator:
context: Any
def __init__(self, context) -> None: ...
def __iter__(self): ...
def __next__(self): ...
class Macro:
name: Any
arguments: Any
defaults: Any
catch_kwargs: Any
catch_varargs: Any
caller: Any
def __init__(self, environment, func, name, arguments, defaults, catch_kwargs, catch_varargs, caller) -> None: ...
def __call__(self, *args, **kwargs): ...
class Undefined:
def __init__(self, hint: Any | None = ..., obj: Any = ..., name: Any | None = ..., exc: Any = ...) -> None: ...
def __getattr__(self, name): ...
__add__: Any
__radd__: Any
__mul__: Any
__rmul__: Any
__div__: Any
__rdiv__: Any
__truediv__: Any
__rtruediv__: Any
__floordiv__: Any
__rfloordiv__: Any
__mod__: Any
__rmod__: Any
__pos__: Any
__neg__: Any
__call__: Any
__getitem__: Any
__lt__: Any
__le__: Any
__gt__: Any
__ge__: Any
__int__: Any
__float__: Any
__complex__: Any
__pow__: Any
__rpow__: Any
def __eq__(self, other): ...
def __ne__(self, other): ...
def __hash__(self): ...
def __len__(self): ...
def __iter__(self): ...
def __nonzero__(self): ...
__bool__: Any
def make_logging_undefined(logger: Any | None = ..., base: Any | None = ...): ...
class DebugUndefined(Undefined): ...
class StrictUndefined(Undefined):
__iter__: Any
__len__: Any
__nonzero__: Any
__eq__: Any
__ne__: Any
__bool__: Any
__hash__: Any

View File

@@ -1,35 +0,0 @@
from typing import Any
from jinja2.environment import Environment
MAX_RANGE: int
UNSAFE_FUNCTION_ATTRIBUTES: Any
UNSAFE_METHOD_ATTRIBUTES: Any
UNSAFE_GENERATOR_ATTRIBUTES: Any
def safe_range(*args): ...
def unsafe(f): ...
def is_internal_attribute(obj, attr): ...
def modifies_known_mutable(obj, attr): ...
class SandboxedEnvironment(Environment):
sandboxed: bool
default_binop_table: Any
default_unop_table: Any
intercepted_binops: Any
intercepted_unops: Any
def intercept_unop(self, operator): ...
binop_table: Any
unop_table: Any
def __init__(self, *args, **kwargs) -> None: ...
def is_safe_attribute(self, obj, attr, value): ...
def is_safe_callable(self, obj): ...
def call_binop(self, context, operator, left, right): ...
def call_unop(self, context, operator, arg): ...
def getitem(self, obj, argument): ...
def getattr(self, obj, attribute): ...
def unsafe_undefined(self, obj, attribute): ...
def call(__self, __context, __obj, *args, **kwargs): ...
class ImmutableSandboxedEnvironment(SandboxedEnvironment):
def is_safe_attribute(self, obj, attr, value): ...

View File

@@ -1,24 +0,0 @@
from typing import Any
number_re: Any
regex_type: Any
test_callable: Any
def test_odd(value): ...
def test_even(value): ...
def test_divisibleby(value, num): ...
def test_defined(value): ...
def test_undefined(value): ...
def test_none(value): ...
def test_lower(value): ...
def test_upper(value): ...
def test_string(value): ...
def test_mapping(value): ...
def test_number(value): ...
def test_sequence(value): ...
def test_equalto(value, other): ...
def test_sameas(value, other): ...
def test_iterable(value): ...
def test_escaped(value): ...
TESTS: Any

View File

@@ -1,84 +0,0 @@
from _typeshed import StrOrBytesPath
from typing import IO, Any, Callable, Iterable, Protocol, Text, TypeVar
from typing_extensions import Literal
from markupsafe import Markup as Markup, escape as escape, soft_unicode as soft_unicode
missing: Any
internal_code: Any
concat: Any
_CallableT = TypeVar("_CallableT", bound=Callable[..., Any])
class _ContextFunction(Protocol[_CallableT]):
contextfunction: Literal[True]
__call__: _CallableT
class _EvalContextFunction(Protocol[_CallableT]):
evalcontextfunction: Literal[True]
__call__: _CallableT
class _EnvironmentFunction(Protocol[_CallableT]):
environmentfunction: Literal[True]
__call__: _CallableT
def contextfunction(f: _CallableT) -> _ContextFunction[_CallableT]: ...
def evalcontextfunction(f: _CallableT) -> _EvalContextFunction[_CallableT]: ...
def environmentfunction(f: _CallableT) -> _EnvironmentFunction[_CallableT]: ...
def internalcode(f: _CallableT) -> _CallableT: ...
def is_undefined(obj: object) -> bool: ...
def select_autoescape(
enabled_extensions: Iterable[str] = ...,
disabled_extensions: Iterable[str] = ...,
default_for_string: bool = ...,
default: bool = ...,
) -> Callable[[str], bool]: ...
def consume(iterable: Iterable[object]) -> None: ...
def clear_caches() -> None: ...
def import_string(import_name: str, silent: bool = ...) -> Any: ...
def open_if_exists(filename: StrOrBytesPath, mode: str = ...) -> IO[Any] | None: ...
def object_type_repr(obj: object) -> str: ...
def pformat(obj: object, verbose: bool = ...) -> str: ...
def urlize(
text: Markup | Text, trim_url_limit: int | None = ..., rel: Markup | Text | None = ..., target: Markup | Text | None = ...
) -> str: ...
def generate_lorem_ipsum(n: int = ..., html: bool = ..., min: int = ..., max: int = ...) -> Markup | str: ...
def unicode_urlencode(obj: object, charset: str = ..., for_qs: bool = ...) -> str: ...
class LRUCache:
capacity: Any
def __init__(self, capacity) -> None: ...
def __getnewargs__(self): ...
def copy(self): ...
def get(self, key, default: Any | None = ...): ...
def setdefault(self, key, default: Any | None = ...): ...
def clear(self): ...
def __contains__(self, key): ...
def __len__(self): ...
def __getitem__(self, key): ...
def __setitem__(self, key, value): ...
def __delitem__(self, key): ...
def items(self): ...
def iteritems(self): ...
def values(self): ...
def itervalue(self): ...
def keys(self): ...
def iterkeys(self): ...
__iter__: Any
def __reversed__(self): ...
__copy__: Any
class Cycler:
items: Any
def __init__(self, *items) -> None: ...
pos: int
def reset(self): ...
@property
def current(self): ...
def __next__(self): ...
class Joiner:
sep: Any
used: bool
def __init__(self, sep: str = ...) -> None: ...
def __call__(self): ...

View File

@@ -1,8 +0,0 @@
class NodeVisitor:
def get_visitor(self, node): ...
def visit(self, node, *args, **kwargs): ...
def generic_visit(self, node, *args, **kwargs): ...
class NodeTransformer(NodeVisitor):
def generic_visit(self, node, *args, **kwargs): ...
def visit_list(self, node, *args, **kwargs): ...

View File

@@ -1,10 +0,0 @@
markupsafe.Markup.__getslice__
markupsafe.Markup.__mod__
markupsafe.Markup.capitalize
markupsafe.Markup.lower
markupsafe.Markup.swapcase
markupsafe.Markup.title
markupsafe.Markup.upper
markupsafe._compat.int_types
markupsafe._compat.iteritems
markupsafe._compat.string_types

View File

@@ -1,3 +0,0 @@
version = "1.1.*"
python2 = true
obsolete_since = "2.0"

View File

@@ -1,56 +0,0 @@
import string
import sys
from typing import Any, Callable, Iterable, Mapping, Sequence, Text
from typing_extensions import SupportsIndex
from markupsafe._compat import text_type
from markupsafe._native import escape as escape, escape_silent as escape_silent, soft_unicode as soft_unicode
class Markup(text_type):
def __new__(cls, base: Text = ..., encoding: Text | None = ..., errors: Text = ...) -> Markup: ...
def __html__(self) -> Markup: ...
def __add__(self, other: text_type) -> Markup: ...
def __radd__(self, other: text_type) -> Markup: ...
def __mul__(self, num: int) -> Markup: ... # type: ignore[override]
def __rmul__(self, num: int) -> Markup: ... # type: ignore[override]
def __mod__(self, *args: Any) -> Markup: ...
def join(self, seq: Iterable[text_type]) -> Markup: ...
def split(self, sep: text_type | None = ..., maxsplit: SupportsIndex = ...) -> list[Markup]: ... # type: ignore[override]
def rsplit(self, sep: text_type | None = ..., maxsplit: SupportsIndex = ...) -> list[Markup]: ... # type: ignore[override]
def splitlines(self, keepends: bool = ...) -> list[Markup]: ... # type: ignore[override]
def unescape(self) -> Text: ...
def striptags(self) -> Text: ...
@classmethod
def escape(cls, s: text_type) -> Markup: ... # noqa: F811
def partition(self, sep: text_type) -> tuple[Markup, Markup, Markup]: ...
def rpartition(self, sep: text_type) -> tuple[Markup, Markup, Markup]: ...
def format(self, *args: Any, **kwargs: Any) -> Markup: ...
def __html_format__(self, format_spec: text_type) -> Markup: ...
def __getslice__(self, start: int, stop: int) -> Markup: ...
def __getitem__(self, i: SupportsIndex | slice) -> Markup: ...
def capitalize(self) -> Markup: ...
def title(self) -> Markup: ...
def lower(self) -> Markup: ...
def upper(self) -> Markup: ...
def swapcase(self) -> Markup: ...
def replace(self, old: text_type, new: text_type, count: SupportsIndex = ...) -> Markup: ...
def ljust(self, width: SupportsIndex, fillchar: text_type = ...) -> Markup: ...
def rjust(self, width: SupportsIndex, fillchar: text_type = ...) -> Markup: ...
def lstrip(self, chars: text_type | None = ...) -> Markup: ...
def rstrip(self, chars: text_type | None = ...) -> Markup: ...
def strip(self, chars: text_type | None = ...) -> Markup: ...
def center(self, width: SupportsIndex, fillchar: text_type = ...) -> Markup: ...
def zfill(self, width: SupportsIndex) -> Markup: ...
def translate(self, table: Mapping[int, int | text_type | None] | Sequence[int | text_type | None]) -> Markup: ...
if sys.version_info >= (3, 8):
def expandtabs(self, tabsize: SupportsIndex = ...) -> Markup: ...
else:
def expandtabs(self, tabsize: int = ...) -> Markup: ...
class EscapeFormatter(string.Formatter):
escape: Callable[[text_type], Markup]
def __init__(self, escape: Callable[[text_type], Markup]) -> None: ... # noqa: F811
def format_field(self, value: text_type, format_spec: text_type) -> Markup: ...
if sys.version_info >= (3,):
soft_str = soft_unicode

View File

@@ -1,21 +0,0 @@
import sys
from typing import Iterator, Mapping, TypeVar
_K = TypeVar("_K")
_V = TypeVar("_V")
PY2: bool
def iteritems(d: Mapping[_K, _V]) -> Iterator[tuple[_K, _V]]: ...
if sys.version_info >= (3,):
text_type = str
string_types = (str,)
unichr = chr
int_types = (int,)
else:
from __builtin__ import unichr as unichr
text_type = unicode
string_types = (str, unicode)
int_types = (int, long)

View File

@@ -1,3 +0,0 @@
from typing import Text
HTML_ENTITIES: dict[Text, int]

View File

@@ -1,8 +0,0 @@
from typing import Text
from . import Markup
from ._compat import text_type
def escape(s: Markup | Text) -> Markup: ...
def escape_silent(s: None | Markup | Text) -> Markup: ...
def soft_unicode(s: Text) -> text_type: ...

View File

@@ -1,8 +0,0 @@
from typing import Text
from . import Markup
from ._compat import text_type
def escape(s: Markup | Text) -> Markup: ...
def escape_silent(s: None | Markup | Text) -> Markup: ...
def soft_unicode(s: Text) -> text_type: ...

View File

@@ -1,149 +0,0 @@
werkzeug.HTTP_STATUS_CODES
werkzeug._compat.BytesIO.readlines
werkzeug._compat.BytesIO.seek
werkzeug._compat.StringIO.seek
werkzeug._compat.StringIO.truncate
werkzeug._compat.fix_tuple_repr
werkzeug._compat.implements_bool
werkzeug._compat.implements_iterator
werkzeug._compat.implements_to_string
werkzeug._compat.native_string_result
werkzeug._compat.try_coerce_native
werkzeug.append_slash_redirect
werkzeug.bind_arguments
werkzeug.check_password_hash
werkzeug.contrib
werkzeug.contrib.atom
werkzeug.contrib.cache
werkzeug.contrib.fixers
werkzeug.contrib.iterio
werkzeug.contrib.jsrouting
werkzeug.contrib.limiter
werkzeug.contrib.lint
werkzeug.contrib.profiler
werkzeug.contrib.securecookie
werkzeug.contrib.sessions
werkzeug.contrib.testtools
werkzeug.contrib.wrappers
werkzeug.cookie_date
werkzeug.create_environ
werkzeug.datastructures.Headers.__delitem__
werkzeug.datastructures.Headers.pop
werkzeug.datastructures.Headers.setdefault
werkzeug.datastructures.Headers.to_list
werkzeug.datastructures.ImmutableDictMixin.fromkeys
werkzeug.datastructures.ImmutableHeadersMixin.add
werkzeug.datastructures.ImmutableHeadersMixin.pop
werkzeug.debug.DebuggedApplication.__init__
werkzeug.debug.tbtools.Frame.console
werkzeug.debug.tbtools.Frame.render
werkzeug.debug.tbtools.Frame.sourcelines
werkzeug.debug.tbtools.Line.classes
werkzeug.debug.tbtools.Traceback.exception
werkzeug.debug.tbtools.Traceback.generate_plaintext_traceback
werkzeug.debug.tbtools.Traceback.is_syntax_error
werkzeug.debug.tbtools.Traceback.plaintext
werkzeug.dump_cookie
werkzeug.dump_header
werkzeug.dump_options_header
werkzeug.escape
werkzeug.exceptions.BadRequestKeyError.__init__
werkzeug.extract_path_info
werkzeug.find_modules
werkzeug.format_string
werkzeug.generate_etag
werkzeug.generate_password_hash
werkzeug.get_current_url
werkzeug.get_host
werkzeug.html
werkzeug.http.dump_age
werkzeug.http.dump_cookie
werkzeug.http.parse_accept_header
werkzeug.http.parse_cache_control_header
werkzeug.http_date
werkzeug.import_string
werkzeug.iri_to_uri
werkzeug.is_entity_header
werkzeug.is_hop_by_hop_header
werkzeug.is_resource_modified
werkzeug.local.LocalProxy.__delslice__
werkzeug.local.LocalProxy.__dict__
werkzeug.local.LocalProxy.__setslice__
werkzeug.local.LocalStack._get__ident_func__
werkzeug.local.LocalStack._set__ident_func__
werkzeug.make_line_iter
werkzeug.middleware.proxy_fix.ProxyFix.__init__
werkzeug.middleware.proxy_fix.ProxyFix.get_remote_addr
werkzeug.middleware.shared_data.SharedDataMiddleware.__call__
werkzeug.module
werkzeug.parse_accept_header
werkzeug.parse_authorization_header
werkzeug.parse_cache_control_header
werkzeug.parse_cookie
werkzeug.parse_date
werkzeug.parse_dict_header
werkzeug.parse_etags
werkzeug.parse_form_data
werkzeug.parse_list_header
werkzeug.parse_options_header
werkzeug.parse_set_header
werkzeug.parse_www_authenticate_header
werkzeug.peek_path_info
werkzeug.pop_path_info
werkzeug.posixemulation.rename
werkzeug.quote_etag
werkzeug.quote_header_value
werkzeug.redirect
werkzeug.release_local
werkzeug.remove_entity_headers
werkzeug.remove_hop_by_hop_headers
werkzeug.responder
werkzeug.routing.FloatConverter.__init__
werkzeug.routing.Map.__init__
werkzeug.routing.MapAdapter.match
werkzeug.routing.NumberConverter.__init__
werkzeug.routing.RequestRedirect.get_response
werkzeug.routing.RequestSlash
werkzeug.routing.Rule.__init__
werkzeug.run_wsgi_app
werkzeug.script
werkzeug.secure_filename
werkzeug.serving.select_ip_version
werkzeug.test.Client.set_cookie
werkzeug.test.EnvironBuilder.__init__
werkzeug.test.File
werkzeug.test_app
werkzeug.unescape
werkzeug.unquote_etag
werkzeug.unquote_header_value
werkzeug.uri_to_iri
werkzeug.url_decode
werkzeug.url_encode
werkzeug.url_fix
werkzeug.url_quote
werkzeug.url_quote_plus
werkzeug.url_unquote
werkzeug.url_unquote_plus
werkzeug.utils.escape
werkzeug.validate_arguments
werkzeug.wrap_file
werkzeug.wrappers.BaseRequest.input_stream
werkzeug.wrappers.BaseRequest.is_multiprocess
werkzeug.wrappers.BaseRequest.is_multithread
werkzeug.wrappers.BaseRequest.is_run_once
werkzeug.wrappers.BaseRequest.max_form_memory_size
werkzeug.wrappers.BaseRequest.method
werkzeug.wrappers.BaseRequest.query_string
werkzeug.wrappers.BaseRequest.remote_user
werkzeug.wrappers.BaseRequest.scheme
werkzeug.wrappers.BaseResponse.freeze
werkzeug.wrappers.CommonResponseDescriptorsMixin.content_encoding
werkzeug.wrappers.CommonResponseDescriptorsMixin.content_length
werkzeug.wrappers.CommonResponseDescriptorsMixin.content_location
werkzeug.wrappers.CommonResponseDescriptorsMixin.content_md5
werkzeug.wrappers.CommonResponseDescriptorsMixin.content_type
werkzeug.wrappers.CommonResponseDescriptorsMixin.location
werkzeug.wsgi.DispatcherMiddleware
werkzeug.wsgi.ProxyMiddleware
werkzeug.wsgi.SharedDataMiddleware
werkzeug.xhtml

View File

@@ -1,4 +0,0 @@
version = "1.0.*"
python2 = true
requires = []
obsolete_since = "2.0"

View File

@@ -1,151 +0,0 @@
from types import ModuleType
from typing import Any
from werkzeug import (
_internal,
datastructures,
debug,
exceptions,
formparser,
http,
local,
security,
serving,
test,
testapp,
urls,
useragents,
utils,
wrappers,
wsgi,
)
class module(ModuleType):
def __getattr__(self, name): ...
def __dir__(self): ...
__version__: Any
run_simple = serving.run_simple
test_app = testapp.test_app
UserAgent = useragents.UserAgent
_easteregg = _internal._easteregg
DebuggedApplication = debug.DebuggedApplication
MultiDict = datastructures.MultiDict
CombinedMultiDict = datastructures.CombinedMultiDict
Headers = datastructures.Headers
EnvironHeaders = datastructures.EnvironHeaders
ImmutableList = datastructures.ImmutableList
ImmutableDict = datastructures.ImmutableDict
ImmutableMultiDict = datastructures.ImmutableMultiDict
TypeConversionDict = datastructures.TypeConversionDict
ImmutableTypeConversionDict = datastructures.ImmutableTypeConversionDict
Accept = datastructures.Accept
MIMEAccept = datastructures.MIMEAccept
CharsetAccept = datastructures.CharsetAccept
LanguageAccept = datastructures.LanguageAccept
RequestCacheControl = datastructures.RequestCacheControl
ResponseCacheControl = datastructures.ResponseCacheControl
ETags = datastructures.ETags
HeaderSet = datastructures.HeaderSet
WWWAuthenticate = datastructures.WWWAuthenticate
Authorization = datastructures.Authorization
FileMultiDict = datastructures.FileMultiDict
CallbackDict = datastructures.CallbackDict
FileStorage = datastructures.FileStorage
OrderedMultiDict = datastructures.OrderedMultiDict
ImmutableOrderedMultiDict = datastructures.ImmutableOrderedMultiDict
escape = utils.escape
environ_property = utils.environ_property
append_slash_redirect = utils.append_slash_redirect
redirect = utils.redirect
cached_property = utils.cached_property
import_string = utils.import_string
dump_cookie = http.dump_cookie
parse_cookie = http.parse_cookie
unescape = utils.unescape
format_string = utils.format_string
find_modules = utils.find_modules
header_property = utils.header_property
html = utils.html
xhtml = utils.xhtml
HTMLBuilder = utils.HTMLBuilder
validate_arguments = utils.validate_arguments
ArgumentValidationError = utils.ArgumentValidationError
bind_arguments = utils.bind_arguments
secure_filename = utils.secure_filename
BaseResponse = wrappers.BaseResponse
BaseRequest = wrappers.BaseRequest
Request = wrappers.Request
Response = wrappers.Response
AcceptMixin = wrappers.AcceptMixin
ETagRequestMixin = wrappers.ETagRequestMixin
ETagResponseMixin = wrappers.ETagResponseMixin
ResponseStreamMixin = wrappers.ResponseStreamMixin
CommonResponseDescriptorsMixin = wrappers.CommonResponseDescriptorsMixin
UserAgentMixin = wrappers.UserAgentMixin
AuthorizationMixin = wrappers.AuthorizationMixin
WWWAuthenticateMixin = wrappers.WWWAuthenticateMixin
CommonRequestDescriptorsMixin = wrappers.CommonRequestDescriptorsMixin
Local = local.Local
LocalManager = local.LocalManager
LocalProxy = local.LocalProxy
LocalStack = local.LocalStack
release_local = local.release_local
generate_password_hash = security.generate_password_hash
check_password_hash = security.check_password_hash
Client = test.Client
EnvironBuilder = test.EnvironBuilder
create_environ = test.create_environ
run_wsgi_app = test.run_wsgi_app
get_current_url = wsgi.get_current_url
get_host = wsgi.get_host
pop_path_info = wsgi.pop_path_info
peek_path_info = wsgi.peek_path_info
SharedDataMiddleware = wsgi.SharedDataMiddleware
DispatcherMiddleware = wsgi.DispatcherMiddleware
ClosingIterator = wsgi.ClosingIterator
FileWrapper = wsgi.FileWrapper
make_line_iter = wsgi.make_line_iter
LimitedStream = wsgi.LimitedStream
responder = wsgi.responder
wrap_file = wsgi.wrap_file
extract_path_info = wsgi.extract_path_info
parse_etags = http.parse_etags
parse_date = http.parse_date
http_date = http.http_date
cookie_date = http.cookie_date
parse_cache_control_header = http.parse_cache_control_header
is_resource_modified = http.is_resource_modified
parse_accept_header = http.parse_accept_header
parse_set_header = http.parse_set_header
quote_etag = http.quote_etag
unquote_etag = http.unquote_etag
generate_etag = http.generate_etag
dump_header = http.dump_header
parse_list_header = http.parse_list_header
parse_dict_header = http.parse_dict_header
parse_authorization_header = http.parse_authorization_header
parse_www_authenticate_header = http.parse_www_authenticate_header
remove_entity_headers = http.remove_entity_headers
is_entity_header = http.is_entity_header
remove_hop_by_hop_headers = http.remove_hop_by_hop_headers
parse_options_header = http.parse_options_header
dump_options_header = http.dump_options_header
is_hop_by_hop_header = http.is_hop_by_hop_header
unquote_header_value = http.unquote_header_value
quote_header_value = http.quote_header_value
HTTP_STATUS_CODES = http.HTTP_STATUS_CODES
url_decode = urls.url_decode
url_encode = urls.url_encode
url_quote = urls.url_quote
url_quote_plus = urls.url_quote_plus
url_unquote = urls.url_unquote
url_unquote_plus = urls.url_unquote_plus
url_fix = urls.url_fix
Href = urls.Href
iri_to_uri = urls.iri_to_uri
uri_to_iri = urls.uri_to_iri
parse_form_data = formparser.parse_form_data
abort = exceptions.Aborter
Aborter = exceptions.Aborter

View File

@@ -1,53 +0,0 @@
import sys
from typing import Any, Text
if sys.version_info >= (3,):
from io import BytesIO as BytesIO, StringIO as StringIO
NativeStringIO = StringIO
else:
import cStringIO
from StringIO import StringIO as StringIO
BytesIO = cStringIO.StringIO
NativeStringIO = BytesIO
PY2: Any
WIN: Any
unichr: Any
text_type: Any
string_types: Any
integer_types: Any
iterkeys: Any
itervalues: Any
iteritems: Any
iterlists: Any
iterlistvalues: Any
int_to_byte: Any
iter_bytes: Any
def fix_tuple_repr(obj): ...
def implements_iterator(cls): ...
def implements_to_string(cls): ...
def native_string_result(func): ...
def implements_bool(cls): ...
range_type: Any
def make_literal_wrapper(reference): ...
def normalize_string_tuple(tup): ...
def try_coerce_native(s): ...
wsgi_get_bytes: Any
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: Any | None = ...): ...
imap: Any
izip: Any
ifilter: Any
def to_unicode(x, charset: Text = ..., errors: Text = ..., allow_none_charset: bool = ...): ...

View File

@@ -1,26 +0,0 @@
from typing import Any
class _Missing:
def __reduce__(self): ...
class _DictAccessorProperty:
read_only: Any
name: Any
default: Any
load_func: Any
dump_func: Any
__doc__: Any
def __init__(
self,
name,
default: Any | None = ...,
load_func: Any | None = ...,
dump_func: Any | None = ...,
read_only: Any | None = ...,
doc: Any | None = ...,
): ...
def __get__(self, obj, type: Any | None = ...): ...
def __set__(self, obj, value): ...
def __delete__(self, obj): ...
def _easteregg(app: Any | None = ...): ...

View File

@@ -1,29 +0,0 @@
from typing import Any
class ReloaderLoop:
name: Any
extra_files: Any
interval: float
def __init__(self, extra_files: Any | None = ..., interval: float = ...): ...
def run(self): ...
def restart_with_reloader(self): ...
def trigger_reload(self, filename): ...
def log_reload(self, filename): ...
class StatReloaderLoop(ReloaderLoop):
name: Any
def run(self): ...
class WatchdogReloaderLoop(ReloaderLoop):
observable_paths: Any
name: Any
observer_class: Any
event_handler: Any
should_reload: Any
def __init__(self, *args, **kwargs): ...
def trigger_reload(self, filename): ...
def run(self): ...
reloader_loops: Any
def run_with_reloader(main_func, extra_files: Any | None = ..., interval: float = ..., reloader_type: str = ...): ...

View File

@@ -1,50 +0,0 @@
from typing import Any
XHTML_NAMESPACE: Any
def format_iso8601(obj): ...
class AtomFeed:
default_generator: Any
title: Any
title_type: Any
url: Any
feed_url: Any
id: Any
updated: Any
author: Any
icon: Any
logo: Any
rights: Any
rights_type: Any
subtitle: Any
subtitle_type: Any
generator: Any
links: Any
entries: Any
def __init__(self, title: Any | None = ..., entries: Any | None = ..., **kwargs): ...
def add(self, *args, **kwargs): ...
def generate(self): ...
def to_string(self): ...
def get_response(self): ...
def __call__(self, environ, start_response): ...
class FeedEntry:
title: Any
title_type: Any
content: Any
content_type: Any
url: Any
id: Any
updated: Any
summary: Any
summary_type: Any
author: Any
published: Any
rights: Any
links: Any
categories: Any
xml_base: Any
def __init__(self, title: Any | None = ..., content: Any | None = ..., feed_url: Any | None = ..., **kwargs): ...
def generate(self): ...
def to_string(self): ...

View File

@@ -1,92 +0,0 @@
from typing import Any
class BaseCache:
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: float | None = ...): ...
def add(self, key, value, timeout: float | None = ...): ...
def set_many(self, mapping, timeout: float | None = ...): ...
def delete_many(self, *keys): ...
def has(self, key): ...
def clear(self): ...
def inc(self, key, delta=...): ...
def dec(self, key, delta=...): ...
class NullCache(BaseCache): ...
class SimpleCache(BaseCache):
clear: Any
def __init__(self, threshold: int = ..., default_timeout: float = ...): ...
def get(self, key): ...
def set(self, key, value, timeout: float | None = ...): ...
def add(self, key, value, timeout: float | None = ...): ...
def delete(self, key): ...
def has(self, key): ...
class MemcachedCache(BaseCache):
key_prefix: Any
def __init__(self, servers: Any | None = ..., default_timeout: float = ..., key_prefix: Any | None = ...): ...
def get(self, key): ...
def get_dict(self, *keys): ...
def add(self, key, value, timeout: float | None = ...): ...
def set(self, key, value, timeout: float | None = ...): ...
def get_many(self, *keys): ...
def set_many(self, mapping, timeout: float | None = ...): ...
def delete(self, key): ...
def delete_many(self, *keys): ...
def has(self, key): ...
def clear(self): ...
def inc(self, key, delta=...): ...
def dec(self, key, delta=...): ...
def import_preferred_memcache_lib(self, servers): ...
GAEMemcachedCache: Any
class RedisCache(BaseCache):
key_prefix: Any
def __init__(
self,
host: str = ...,
port: int = ...,
password: Any | None = ...,
db: int = ...,
default_timeout: float = ...,
key_prefix: Any | None = ...,
**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: float | None = ...): ...
def add(self, key, value, timeout: float | None = ...): ...
def set_many(self, mapping, timeout: float | None = ...): ...
def delete(self, key): ...
def delete_many(self, *keys): ...
def has(self, key): ...
def clear(self): ...
def inc(self, key, delta=...): ...
def dec(self, key, delta=...): ...
class FileSystemCache(BaseCache):
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: float | None = ...): ...
def set(self, key, value, timeout: float | None = ...): ...
def delete(self, key): ...
def has(self, key): ...
class UWSGICache(BaseCache):
cache: Any
def __init__(self, default_timeout: float = ..., cache: str = ...): ...
def get(self, key): ...
def delete(self, key): ...
def set(self, key, value, timeout: float | None = ...): ...
def add(self, key, value, timeout: float | None = ...): ...
def clear(self): ...
def has(self, key): ...

View File

@@ -1,35 +0,0 @@
from _typeshed.wsgi import StartResponse, WSGIApplication, WSGIEnvironment
from typing import Any, Iterable, Mapping, Text
from ..middleware.proxy_fix import ProxyFix as ProxyFix
class CGIRootFix(object):
app: WSGIApplication
app_root: Text
def __init__(self, app: WSGIApplication, app_root: Text = ...) -> None: ...
def __call__(self, environ: WSGIEnvironment, start_response: StartResponse) -> Iterable[bytes]: ...
class LighttpdCGIRootFix(CGIRootFix): ...
class PathInfoFromRequestUriFix(object):
app: WSGIApplication
def __init__(self, app: WSGIApplication) -> None: ...
def __call__(self, environ: WSGIEnvironment, start_response: StartResponse) -> Iterable[bytes]: ...
class HeaderRewriterFix(object):
app: WSGIApplication
remove_headers: set[Text]
add_headers: list[Text]
def __init__(
self, app: WSGIApplication, remove_headers: Iterable[Text] | None = ..., add_headers: Iterable[Text] | None = ...
) -> None: ...
def __call__(self, environ: WSGIEnvironment, start_response: StartResponse) -> Iterable[bytes]: ...
class InternetExplorerFix(object):
app: WSGIApplication
fix_vary: bool
fix_attach: bool
def __init__(self, app: WSGIApplication, fix_vary: bool = ..., fix_attach: bool = ...) -> None: ...
def fix_headers(self, environ: WSGIEnvironment, headers: Mapping[str, str], status: Any | None = ...) -> None: ...
def run_fixed(self, environ: WSGIEnvironment, start_response: StartResponse) -> Iterable[bytes]: ...
def __call__(self, environ: WSGIEnvironment, start_response: StartResponse) -> Iterable[bytes]: ...

View File

@@ -1,39 +0,0 @@
from typing import Any, Text
greenlet: Any
class IterIO:
def __new__(cls, obj, sentinel: Text | bytes = ...): ...
def __iter__(self): ...
def tell(self): ...
def isatty(self): ...
def seek(self, pos, mode: int = ...): ...
def truncate(self, size: Any | None = ...): ...
def write(self, s): ...
def writelines(self, list): ...
def read(self, n: int = ...): ...
def readlines(self, sizehint: int = ...): ...
def readline(self, length: Any | None = ...): ...
def flush(self): ...
def __next__(self): ...
class IterI(IterIO):
sentinel: Any
def __new__(cls, func, sentinel: Text | bytes = ...): ...
closed: Any
def close(self): ...
def write(self, s): ...
def writelines(self, list): ...
def flush(self): ...
class IterO(IterIO):
sentinel: Any
closed: Any
pos: Any
def __new__(cls, gen, sentinel: Text | bytes = ...): ...
def __iter__(self): ...
def close(self): ...
def seek(self, pos, mode: int = ...): ...
def read(self, n: int = ...): ...
def readline(self, length: Any | None = ...): ...
def readlines(self, sizehint: int = ...): ...

View File

@@ -1,10 +0,0 @@
from typing import Any
def dumps(*args): ...
def render_template(name_parts, rules, converters): ...
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): ...
js_to_url_functions: Any

View File

@@ -1,7 +0,0 @@
from typing import Any
class StreamLimitMiddleware:
app: Any
maximum_size: Any
def __init__(self, app, maximum_size=...): ...
def __call__(self, environ, start_response): ...

View File

@@ -1 +0,0 @@
from ..middleware.lint import *

View File

@@ -1,9 +0,0 @@
from _typeshed import SupportsWrite
from typing import AnyStr, Generic, Tuple
from ..middleware.profiler import *
class MergeStream(Generic[AnyStr]):
streams: Tuple[SupportsWrite[AnyStr], ...]
def __init__(self, *streams: SupportsWrite[AnyStr]) -> None: ...
def write(self, data: AnyStr) -> None: ...

View File

@@ -1,39 +0,0 @@
from hashlib import sha1 as _default_hash
from hmac import new as hmac
from typing import Any
from werkzeug.contrib.sessions import ModificationTrackingDict
class UnquoteError(Exception): ...
class SecureCookie(ModificationTrackingDict[Any, Any]):
hash_method: Any
serialization_method: Any
quote_base64: Any
secret_key: Any
new: Any
def __init__(self, data: Any | None = ..., secret_key: Any | None = ..., new: bool = ...): ...
@property
def should_save(self): ...
@classmethod
def quote(cls, value): ...
@classmethod
def unquote(cls, value): ...
def serialize(self, expires: Any | None = ...): ...
@classmethod
def unserialize(cls, string, secret_key): ...
@classmethod
def load_cookie(cls, request, key: str = ..., secret_key: Any | None = ...): ...
def save_cookie(
self,
response,
key: str = ...,
expires: Any | None = ...,
session_expires: Any | None = ...,
max_age: Any | None = ...,
path: str = ...,
domain: Any | None = ...,
secure: Any | None = ...,
httponly: bool = ...,
force: bool = ...,
): ...

View File

@@ -1,77 +0,0 @@
from typing import Any, Text, TypeVar
from werkzeug.datastructures import CallbackDict
_K = TypeVar("_K")
_V = TypeVar("_V")
def generate_key(salt: Any | None = ...): ...
class ModificationTrackingDict(CallbackDict[_K, _V]):
modified: Any
def __init__(self, *args, **kwargs): ...
def copy(self): ...
def __copy__(self): ...
class Session(ModificationTrackingDict[_K, _V]):
sid: Any
new: Any
def __init__(self, data, sid, new: bool = ...): ...
@property
def should_save(self): ...
class SessionStore:
session_class: Any
def __init__(self, session_class: Any | None = ...): ...
def is_valid_key(self, key): ...
def generate_key(self, salt: Any | None = ...): ...
def new(self): ...
def save(self, session): ...
def save_if_modified(self, session): ...
def delete(self, session): ...
def get(self, sid): ...
class FilesystemSessionStore(SessionStore):
path: Any
filename_template: str
renew_missing: Any
mode: Any
def __init__(
self,
path: Any | None = ...,
filename_template: Text = ...,
session_class: Any | None = ...,
renew_missing: bool = ...,
mode: int = ...,
): ...
def get_session_filename(self, sid): ...
def save(self, session): ...
def delete(self, session): ...
def get(self, sid): ...
def list(self): ...
class SessionMiddleware:
app: Any
store: Any
cookie_name: Any
cookie_age: Any
cookie_expires: Any
cookie_path: Any
cookie_domain: Any
cookie_secure: Any
cookie_httponly: Any
environ_key: Any
def __init__(
self,
app,
store,
cookie_name: str = ...,
cookie_age: Any | None = ...,
cookie_expires: Any | None = ...,
cookie_path: str = ...,
cookie_domain: Any | None = ...,
cookie_secure: Any | None = ...,
cookie_httponly: bool = ...,
environ_key: str = ...,
): ...
def __call__(self, environ, start_response): ...

View File

@@ -1,8 +0,0 @@
from werkzeug.wrappers import Response
class ContentAccessors:
def xml(self): ...
def lxml(self): ...
def json(self): ...
class TestResponse(Response, ContentAccessors): ...

View File

@@ -1,27 +0,0 @@
from typing import Any
def is_known_charset(charset): ...
class JSONRequestMixin:
def json(self): ...
class ProtobufRequestMixin:
protobuf_check_initialization: Any
def parse_protobuf(self, proto_type): ...
class RoutingArgsRequestMixin:
routing_args: Any
routing_vars: Any
class ReverseSlashBehaviorRequestMixin:
def path(self): ...
def script_root(self): ...
class DynamicCharsetRequestMixin:
default_charset: Any
def unknown_charset(self, charset): ...
def charset(self): ...
class DynamicCharsetResponseMixin:
default_charset: Any
charset: Any

View File

@@ -1,474 +0,0 @@
import sys
from _typeshed import SupportsWrite
from typing import (
IO,
Any,
Callable,
Container,
Dict,
Generic,
Iterable,
Iterator,
List,
Mapping,
MutableSet,
NoReturn,
Text,
Tuple,
Type,
TypeVar,
overload,
)
if sys.version_info >= (3, 8):
from typing import SupportsIndex
else:
from typing_extensions import SupportsIndex
_K = TypeVar("_K")
_V = TypeVar("_V")
_R = TypeVar("_R")
_D = TypeVar("_D")
def is_immutable(self) -> NoReturn: ...
def iter_multi_items(mapping): ...
def native_itermethods(names): ...
class ImmutableListMixin(Generic[_V]):
def __hash__(self) -> int: ...
def __reduce_ex__(self: _D, protocol) -> tuple[Type[_D], list[_V]]: ...
def __delitem__(self, key: _V) -> NoReturn: ...
def __iadd__(self, other: Any) -> NoReturn: ...
def __imul__(self, other: Any) -> NoReturn: ...
def __setitem__(self, key: str, value: Any) -> NoReturn: ...
def append(self, item: Any) -> NoReturn: ...
def remove(self, item: Any) -> NoReturn: ...
def extend(self, iterable: Any) -> NoReturn: ...
def insert(self, pos: int, value: Any) -> NoReturn: ...
def pop(self, index: int = ...) -> NoReturn: ...
def reverse(self) -> NoReturn: ...
def sort(self, cmp: Any | None = ..., key: Any | None = ..., reverse: Any | None = ...) -> NoReturn: ...
class ImmutableList(ImmutableListMixin[_V], List[_V]): ... # type: ignore[misc]
class ImmutableDictMixin(object):
@classmethod
def fromkeys(cls, *args, **kwargs): ...
def __reduce_ex__(self, protocol): ...
def __hash__(self) -> int: ...
def setdefault(self, key, default: Any | None = ...): ...
def update(self, *args, **kwargs): ...
def pop(self, key, default: Any | None = ...): ...
def popitem(self): ...
def __setitem__(self, key, value): ...
def __delitem__(self, key): ...
def clear(self): ...
class ImmutableMultiDictMixin(ImmutableDictMixin):
def __reduce_ex__(self, protocol): ...
def add(self, key, value): ...
def popitemlist(self): ...
def poplist(self, key): ...
def setlist(self, key, new_list): ...
def setlistdefault(self, key, default_list: Any | None = ...): ...
class UpdateDictMixin(object):
on_update: Any
def setdefault(self, key, default: Any | None = ...): ...
def pop(self, key, default=...): ...
__setitem__: Any
__delitem__: Any
clear: Any
popitem: Any
update: Any
class TypeConversionDict(Dict[_K, _V]):
@overload
def get(self, key: _K, *, type: None = ...) -> _V | None: ...
@overload
def get(self, key: _K, default: _D, type: None = ...) -> _V | _D: ...
@overload
def get(self, key: _K, *, type: Callable[[_V], _R]) -> _R | None: ...
@overload
def get(self, key: _K, default: _D, type: Callable[[_V], _R]) -> _R | _D: ...
class ImmutableTypeConversionDict(ImmutableDictMixin, TypeConversionDict[_K, _V]): # type: ignore[misc]
def copy(self) -> TypeConversionDict[_K, _V]: ...
def __copy__(self) -> ImmutableTypeConversionDict[_K, _V]: ...
class ViewItems:
def __init__(self, multi_dict, method, repr_name, *a, **kw): ...
def __iter__(self): ...
class MultiDict(TypeConversionDict[_K, _V]):
def __init__(self, mapping: Any | None = ...): ...
def __getitem__(self, key): ...
def __setitem__(self, key, value): ...
def add(self, key, value): ...
def getlist(self, key, type: Any | None = ...): ...
def setlist(self, key, new_list): ...
def setdefault(self, key, default: Any | None = ...): ...
def setlistdefault(self, key, default_list: Any | None = ...): ...
def items(self, multi: bool = ...): ...
def lists(self): ...
def keys(self): ...
__iter__: Any
def values(self): ...
def listvalues(self): ...
def copy(self): ...
def deepcopy(self, memo: Any | None = ...): ...
def to_dict(self, flat: bool = ...): ...
def update(self, other_dict): ...
def pop(self, key, default=...): ...
def popitem(self): ...
def poplist(self, key): ...
def popitemlist(self): ...
def __copy__(self): ...
def __deepcopy__(self, memo): ...
class _omd_bucket:
prev: Any
key: Any
value: Any
next: Any
def __init__(self, omd, key, value): ...
def unlink(self, omd): ...
class OrderedMultiDict(MultiDict[_K, _V]):
def __init__(self, mapping: Any | None = ...): ...
def __eq__(self, other): ...
def __ne__(self, other): ...
def __reduce_ex__(self, protocol): ...
def __getitem__(self, key): ...
def __setitem__(self, key, value): ...
def __delitem__(self, key): ...
def keys(self): ...
__iter__: Any
def values(self): ...
def items(self, multi: bool = ...): ...
def lists(self): ...
def listvalues(self): ...
def add(self, key, value): ...
def getlist(self, key, type: Any | None = ...): ...
def setlist(self, key, new_list): ...
def setlistdefault(self, key, default_list: Any | None = ...): ...
def update(self, mapping): ...
def poplist(self, key): ...
def pop(self, key, default=...): ...
def popitem(self): ...
def popitemlist(self): ...
class Headers(object):
def __init__(self, defaults: Any | None = ...): ...
def __getitem__(self, key, _get_mode: bool = ...): ...
def __eq__(self, other): ...
def __ne__(self, other): ...
@overload
def get(self, key: str, *, type: None = ...) -> str | None: ...
@overload
def get(self, key: str, default: _D, type: None = ...) -> str | _D: ...
@overload
def get(self, key: str, *, type: Callable[[str], _R]) -> _R | None: ...
@overload
def get(self, key: str, default: _D, type: Callable[[str], _R]) -> _R | _D: ...
@overload
def get(self, key: str, *, as_bytes: bool) -> Any: ...
@overload
def get(self, key: str, *, type: None, as_bytes: bool) -> Any: ...
@overload
def get(self, key: str, *, type: Callable[[Any], _R], as_bytes: bool) -> _R | None: ...
@overload
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) -> _R | _D: ...
def getlist(self, key, type: Any | None = ..., as_bytes: bool = ...): ...
def get_all(self, name): ...
def items(self, lower: bool = ...): ...
def keys(self, lower: bool = ...): ...
def values(self): ...
def extend(self, iterable): ...
def __delitem__(self, key: Any) -> None: ...
def remove(self, key): ...
@overload
def pop(self, key: int | None = ...) -> str: ... # default is ignored, using it is an error
@overload
def pop(self, key: str) -> str: ...
@overload
def pop(self, key: str, default: str) -> str: ...
@overload
def pop(self, key: str, default: None) -> str | None: ...
def popitem(self): ...
def __contains__(self, key): ...
has_key: Any
def __iter__(self): ...
def __len__(self): ...
def add(self, _key, _value, **kw): ...
def add_header(self, _key, _value, **_kw): ...
def clear(self): ...
def set(self, _key, _value, **kw): ...
def setdefault(self, key, value): ...
def __setitem__(self, key, value): ...
def to_list(self, charset: Text = ...): ...
def to_wsgi_list(self): ...
def copy(self): ...
def __copy__(self): ...
class ImmutableHeadersMixin:
def __delitem__(self, key: str) -> None: ...
def __setitem__(self, key, value): ...
set: Any
def add(self, *args, **kwargs): ...
remove: Any
add_header: Any
def extend(self, iterable): ...
def insert(self, pos, value): ...
@overload
def pop(self, key: int | None = ...) -> str: ... # default is ignored, using it is an error
@overload
def pop(self, key: str) -> str: ...
@overload
def pop(self, key: str, default: str) -> str: ...
@overload
def pop(self, key: str, default: None) -> str | None: ...
def popitem(self): ...
def setdefault(self, key, default): ...
class EnvironHeaders(ImmutableHeadersMixin, Headers):
environ: Any
def __init__(self, environ): ...
def __eq__(self, other): ...
def __getitem__(self, key, _get_mode: bool = ...): ...
def __len__(self): ...
def __iter__(self): ...
def copy(self): ...
class CombinedMultiDict(ImmutableMultiDictMixin, MultiDict[_K, _V]): # type: ignore[misc]
def __reduce_ex__(self, protocol): ...
dicts: Any
def __init__(self, dicts: Any | None = ...): ...
@classmethod
def fromkeys(cls): ...
def __getitem__(self, key): ...
def get(self, key, default: Any | None = ..., type: Any | None = ...): ...
def getlist(self, key, type: Any | None = ...): ...
def keys(self): ...
__iter__: Any
def items(self, multi: bool = ...): ...
def values(self): ...
def lists(self): ...
def listvalues(self): ...
def copy(self): ...
def to_dict(self, flat: bool = ...): ...
def __len__(self): ...
def __contains__(self, key): ...
has_key: Any
class FileMultiDict(MultiDict[_K, _V]):
def add_file(self, name, file, filename: Any | None = ..., content_type: Any | None = ...): ...
class ImmutableDict(ImmutableDictMixin, Dict[_K, _V]): # type: ignore[misc]
def copy(self): ...
def __copy__(self): ...
class ImmutableMultiDict(ImmutableMultiDictMixin, MultiDict[_K, _V]): # type: ignore[misc]
def copy(self): ...
def __copy__(self): ...
class ImmutableOrderedMultiDict(ImmutableMultiDictMixin, OrderedMultiDict[_K, _V]): # type: ignore[misc]
def copy(self): ...
def __copy__(self): ...
class Accept(ImmutableList[Tuple[str, float]]):
provided: bool
def __init__(self, values: None | Accept | Iterable[tuple[str, float]] = ...) -> None: ...
@overload
def __getitem__(self, key: SupportsIndex) -> tuple[str, float]: ...
@overload
def __getitem__(self, s: slice) -> list[tuple[str, float]]: ...
@overload
def __getitem__(self, key: str) -> float: ...
def quality(self, key: str) -> float: ...
def __contains__(self, value: str) -> bool: ... # type: ignore[override]
def index(self, key: str | tuple[str, float]) -> int: ... # type: ignore[override]
def find(self, key: str | tuple[str, float]) -> int: ...
def values(self) -> Iterator[str]: ...
def to_header(self) -> str: ...
@overload
def best_match(self, matches: Iterable[str], default: None = ...) -> str | None: ...
@overload
def best_match(self, matches: Iterable[str], default: _D) -> str | _D: ...
@property
def best(self) -> str | None: ...
class MIMEAccept(Accept):
@property
def accept_html(self) -> bool: ...
@property
def accept_xhtml(self) -> bool: ...
@property
def accept_json(self) -> bool: ...
class LanguageAccept(Accept): ...
class CharsetAccept(Accept): ...
def cache_property(key, empty, type): ...
class _CacheControl(UpdateDictMixin, Dict[str, Any]):
no_cache: Any
no_store: Any
max_age: Any
no_transform: Any
on_update: Any
provided: Any
def __init__(self, values=..., on_update: Any | None = ...): ...
def to_header(self): ...
class RequestCacheControl(ImmutableDictMixin, _CacheControl): # type: ignore[misc]
max_stale: Any
min_fresh: Any
no_transform: Any
only_if_cached: Any
class ResponseCacheControl(_CacheControl):
public: Any
private: Any
must_revalidate: Any
proxy_revalidate: Any
s_maxage: Any
class CallbackDict(UpdateDictMixin, Dict[_K, _V]):
on_update: Any
def __init__(self, initial: Any | None = ..., on_update: Any | None = ...): ...
class HeaderSet(MutableSet[str]):
on_update: Any
def __init__(self, headers: Any | None = ..., on_update: Any | None = ...): ...
def add(self, header): ...
def remove(self, header): ...
def update(self, iterable): ...
def discard(self, header): ...
def find(self, header): ...
def index(self, header): ...
def clear(self): ...
def as_set(self, preserve_casing: bool = ...): ...
def to_header(self): ...
def __getitem__(self, idx): ...
def __delitem__(self, idx): ...
def __setitem__(self, idx, value): ...
def __contains__(self, header): ...
def __len__(self): ...
def __iter__(self): ...
def __nonzero__(self): ...
class ETags(Container[str], Iterable[str]):
star_tag: Any
def __init__(self, strong_etags: Any | None = ..., weak_etags: Any | None = ..., 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: Any | None = ..., data: Any | None = ..., include_weak: bool = ...): ...
def __bool__(self): ...
__nonzero__: Any
def __iter__(self): ...
def __contains__(self, etag): ...
class IfRange:
etag: Any
date: Any
def __init__(self, etag: Any | None = ..., date: Any | None = ...): ...
def to_header(self): ...
class Range:
units: Any
ranges: Any
def __init__(self, units, ranges): ...
def range_for_length(self, length): ...
def make_content_range(self, length): ...
def to_header(self): ...
def to_content_range_header(self, length): ...
class ContentRange:
on_update: Any
units: str | None
start: Any
stop: Any
length: Any
def __init__(self, units: str | None, start, stop, length: Any | None = ..., on_update: Any | None = ...): ...
def set(self, start, stop, length: Any | None = ..., units: str | None = ...): ...
def unset(self) -> None: ...
def to_header(self): ...
def __nonzero__(self): ...
__bool__: Any
class Authorization(ImmutableDictMixin, Dict[str, Any]): # type: ignore[misc]
type: str
def __init__(self, auth_type: str, data: Mapping[str, Any] | None = ...) -> None: ...
@property
def username(self) -> str | None: ...
@property
def password(self) -> str | None: ...
@property
def realm(self) -> str | None: ...
@property
def nonce(self) -> str | None: ...
@property
def uri(self) -> str | None: ...
@property
def nc(self) -> str | None: ...
@property
def cnonce(self) -> str | None: ...
@property
def response(self) -> str | None: ...
@property
def opaque(self) -> str | None: ...
@property
def qop(self) -> str | None: ...
class WWWAuthenticate(UpdateDictMixin, Dict[str, Any]):
on_update: Any
def __init__(self, auth_type: Any | None = ..., values: Any | None = ..., on_update: Any | None = ...): ...
def set_basic(self, realm: str = ...): ...
def set_digest(self, realm, nonce, qop=..., opaque: Any | None = ..., algorithm: Any | None = ..., stale: bool = ...): ...
def to_header(self): ...
@staticmethod
def auth_property(name, doc: Any | None = ...): ...
type: Any
realm: Any
domain: Any
nonce: Any
opaque: Any
algorithm: Any
qop: Any
stale: Any
class FileStorage(object):
name: Text | None
stream: IO[bytes]
filename: Text | None
headers: Headers
def __init__(
self,
stream: IO[bytes] | None = ...,
filename: None | Text | bytes = ...,
name: Text | None = ...,
content_type: Text | None = ...,
content_length: int | None = ...,
headers: Headers | None = ...,
): ...
@property
def content_type(self) -> Text | None: ...
@property
def content_length(self) -> int: ...
@property
def mimetype(self) -> str: ...
@property
def mimetype_params(self) -> dict[str, str]: ...
def save(self, dst: Text | SupportsWrite[bytes], buffer_size: int = ...): ...
def close(self) -> None: ...
def __nonzero__(self) -> bool: ...
def __bool__(self) -> bool: ...
def __getattr__(self, name: Text) -> Any: ...
def __iter__(self) -> Iterator[bytes]: ...

View File

@@ -1,51 +0,0 @@
from typing import Any
from werkzeug.wrappers import BaseRequest as Request, BaseResponse as Response
PIN_TIME: Any
def hash_pin(pin): ...
def get_machine_id(): ...
class _ConsoleFrame:
console: Any
id: Any
def __init__(self, namespace): ...
def get_pin_and_cookie_name(app): ...
class DebuggedApplication:
app: Any
evalex: Any
frames: Any
tracebacks: Any
request_key: Any
console_path: Any
console_init_func: Any
show_hidden_frames: Any
secret: Any
pin_logging: Any
pin: Any
def __init__(
self,
app,
evalex: bool = ...,
request_key: str = ...,
console_path: str = ...,
console_init_func: Any | None = ...,
show_hidden_frames: bool = ...,
lodgeit_url: Any | None = ...,
pin_security: bool = ...,
pin_logging: bool = ...,
): ...
@property
def pin_cookie_name(self): ...
def debug_application(self, environ, start_response): ...
def execute_command(self, request, command, frame): ...
def display_console(self, request): ...
def paste_traceback(self, request, traceback): ...
def get_resource(self, request, filename): ...
def check_pin_trust(self, environ): ...
def pin_auth(self, request): ...
def log_pin_request(self): ...
def __call__(self, environ, start_response): ...

View File

@@ -1,44 +0,0 @@
import code
from typing import Any
class HTMLStringO:
def __init__(self): ...
def isatty(self): ...
def close(self): ...
def flush(self): ...
def seek(self, n, mode: int = ...): ...
def readline(self): ...
def reset(self): ...
def write(self, x): ...
def writelines(self, x): ...
class ThreadedStream:
@staticmethod
def push(): ...
@staticmethod
def fetch(): ...
@staticmethod
def displayhook(obj): ...
def __setattr__(self, name, value): ...
def __dir__(self): ...
def __getattribute__(self, name): ...
class _ConsoleLoader:
def __init__(self): ...
def register(self, code, source): ...
def get_source_by_code(self, code): ...
class _InteractiveConsole(code.InteractiveInterpreter):
globals: Any
more: Any
buffer: Any
def __init__(self, globals, locals): ...
def runsource(self, source): ...
def runcode(self, code): ...
def showtraceback(self): ...
def showsyntaxerror(self, filename: Any | None = ...): ...
def write(self, data): ...
class Console:
def __init__(self, globals: Any | None = ..., locals: Any | None = ...): ...
def eval(self, code): ...

View File

@@ -1,33 +0,0 @@
from typing import Any
deque: Any
missing: Any
RegexType: Any
HELP_HTML: Any
OBJECT_DUMP_HTML: Any
def debug_repr(obj): ...
def dump(obj=...): ...
class _Helper:
def __call__(self, topic: Any | None = ...): ...
helper: Any
class DebugReprGenerator:
def __init__(self): ...
list_repr: Any
tuple_repr: Any
set_repr: Any
frozenset_repr: Any
deque_repr: Any
def regex_repr(self, obj): ...
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: Any | None = ...): ...

View File

@@ -1,63 +0,0 @@
from typing import Any
UTF8_COOKIE: Any
system_exceptions: Any
HEADER: Any
FOOTER: Any
PAGE_HTML: Any
CONSOLE_HTML: Any
SUMMARY_HTML: Any
FRAME_HTML: Any
SOURCE_LINE_HTML: Any
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: Any
code: Any
in_frame: Any
current: Any
def __init__(self, lineno, code): ...
def classes(self): ...
def render(self): ...
class Traceback:
exc_type: Any
exc_value: Any
exception_type: Any
frames: Any
def __init__(self, exc_type, exc_value, tb): ...
def filter_hidden_frames(self): ...
def is_syntax_error(self): ...
def exception(self): ...
def log(self, logfile: Any | None = ...): ...
def paste(self): ...
def render_summary(self, include_title: bool = ...): ...
def render_full(self, evalex: bool = ..., secret: Any | None = ..., evalex_trusted: bool = ...): ...
def generate_plaintext_traceback(self): ...
def plaintext(self): ...
id: Any
class Frame:
lineno: Any
function_name: Any
locals: Any
globals: Any
filename: Any
module: Any
loader: Any
code: Any
hide: Any
info: Any
def __init__(self, exc_type, exc_value, tb): ...
def render(self): ...
def render_line_context(self): ...
def get_annotated_lines(self): ...
def eval(self, code, mode: str = ...): ...
def sourcelines(self): ...
def get_context_lines(self, context: int = ...): ...
@property
def current_line(self): ...
def console(self): ...
id: Any

View File

@@ -1,180 +0,0 @@
import datetime
from _typeshed.wsgi import StartResponse, WSGIEnvironment
from typing import Any, Iterable, NoReturn, Protocol, Text, Tuple, Type
from werkzeug.wrappers import Response
class _EnvironContainer(Protocol):
@property
def environ(self) -> WSGIEnvironment: ...
class HTTPException(Exception):
code: int | None
description: Text | None
response: Response | None
def __init__(self, description: Text | None = ..., response: Response | None = ...) -> None: ...
@classmethod
def wrap(cls, exception: Type[Exception], name: str | None = ...) -> Any: ...
@property
def name(self) -> str: ...
def get_description(self, environ: WSGIEnvironment | None = ...) -> Text: ...
def get_body(self, environ: WSGIEnvironment | None = ...) -> Text: ...
def get_headers(self, environ: WSGIEnvironment | None = ...) -> list[tuple[str, str]]: ...
def get_response(self, environ: WSGIEnvironment | _EnvironContainer | None = ...) -> Response: ...
def __call__(self, environ: WSGIEnvironment, start_response: StartResponse) -> Iterable[bytes]: ...
default_exceptions: dict[int, Type[HTTPException]]
class BadRequest(HTTPException):
code: int
description: Text
class ClientDisconnected(BadRequest): ...
class SecurityError(BadRequest): ...
class BadHost(BadRequest): ...
class Unauthorized(HTTPException):
code: int
description: Text
www_authenticate: Iterable[object] | None
def __init__(
self,
description: Text | None = ...,
response: Response | None = ...,
www_authenticate: None | Tuple[object, ...] | list[object] | object = ...,
) -> None: ...
class Forbidden(HTTPException):
code: int
description: Text
class NotFound(HTTPException):
code: int
description: Text
class MethodNotAllowed(HTTPException):
code: int
description: Text
valid_methods: Any
def __init__(self, valid_methods: Any | None = ..., description: Any | None = ...): ...
class NotAcceptable(HTTPException):
code: int
description: Text
class RequestTimeout(HTTPException):
code: int
description: Text
class Conflict(HTTPException):
code: int
description: Text
class Gone(HTTPException):
code: int
description: Text
class LengthRequired(HTTPException):
code: int
description: Text
class PreconditionFailed(HTTPException):
code: int
description: Text
class RequestEntityTooLarge(HTTPException):
code: int
description: Text
class RequestURITooLarge(HTTPException):
code: int
description: Text
class UnsupportedMediaType(HTTPException):
code: int
description: Text
class RequestedRangeNotSatisfiable(HTTPException):
code: int
description: Text
length: Any
units: str
def __init__(self, length: Any | None = ..., units: str = ..., description: Any | None = ...): ...
class ExpectationFailed(HTTPException):
code: int
description: Text
class ImATeapot(HTTPException):
code: int
description: Text
class UnprocessableEntity(HTTPException):
code: int
description: Text
class Locked(HTTPException):
code: int
description: Text
class FailedDependency(HTTPException):
code: int
description: Text
class PreconditionRequired(HTTPException):
code: int
description: Text
class _RetryAfter(HTTPException):
retry_after: None | int | datetime.datetime
def __init__(
self, description: Text | None = ..., response: Response | None = ..., retry_after: None | int | datetime.datetime = ...
) -> None: ...
class TooManyRequests(_RetryAfter):
code: int
description: Text
class RequestHeaderFieldsTooLarge(HTTPException):
code: int
description: Text
class UnavailableForLegalReasons(HTTPException):
code: int
description: Text
class InternalServerError(HTTPException):
def __init__(
self, description: Text | None = ..., response: Response | None = ..., original_exception: Exception | None = ...
) -> None: ...
code: int
description: Text
class NotImplemented(HTTPException):
code: int
description: Text
class BadGateway(HTTPException):
code: int
description: Text
class ServiceUnavailable(_RetryAfter):
code: int
description: Text
class GatewayTimeout(HTTPException):
code: int
description: Text
class HTTPVersionNotSupported(HTTPException):
code: int
description: Text
class Aborter:
mapping: Any
def __init__(self, mapping: Any | None = ..., extra: Any | None = ...) -> None: ...
def __call__(self, code: int | Response, *args: Any, **kwargs: Any) -> NoReturn: ...
def abort(status: int | Response, *args: Any, **kwargs: Any) -> NoReturn: ...
class BadRequestKeyError(BadRequest, KeyError): ...

View File

@@ -1,7 +0,0 @@
from typing import Any
has_likely_buggy_unicode_filesystem: Any
class BrokenFilesystemWarning(RuntimeWarning, UnicodeWarning): ...
def get_filesystem_encoding(): ...

View File

@@ -1,87 +0,0 @@
from _typeshed.wsgi import WSGIEnvironment
from typing import IO, Any, Callable, Generator, Iterable, Mapping, NoReturn, Optional, Protocol, Text, Tuple, TypeVar
from .datastructures import Headers
_Dict = Any
_ParseFunc = Callable[[IO[bytes], str, Optional[int], Mapping[str, str]], Tuple[IO[bytes], _Dict, _Dict]]
_F = TypeVar("_F", bound=Callable[..., Any])
class _StreamFactory(Protocol):
def __call__(
self, total_content_length: int | None, filename: str, content_type: str, content_length: int | None = ...
) -> IO[bytes]: ...
def default_stream_factory(
total_content_length: int | None, filename: str, content_type: str, content_length: int | None = ...
) -> IO[bytes]: ...
def parse_form_data(
environ: WSGIEnvironment,
stream_factory: _StreamFactory | None = ...,
charset: Text = ...,
errors: Text = ...,
max_form_memory_size: int | None = ...,
max_content_length: int | None = ...,
cls: Callable[[], _Dict] | None = ...,
silent: bool = ...,
) -> tuple[IO[bytes], _Dict, _Dict]: ...
def exhaust_stream(f: _F) -> _F: ...
class FormDataParser(object):
stream_factory: _StreamFactory
charset: Text
errors: Text
max_form_memory_size: int | None
max_content_length: int | None
cls: Callable[[], _Dict]
silent: bool
def __init__(
self,
stream_factory: _StreamFactory | None = ...,
charset: Text = ...,
errors: Text = ...,
max_form_memory_size: int | None = ...,
max_content_length: int | None = ...,
cls: Callable[[], _Dict] | None = ...,
silent: bool = ...,
) -> None: ...
def get_parse_func(self, mimetype: str, options: Any) -> _ParseFunc | None: ...
def parse_from_environ(self, environ: WSGIEnvironment) -> tuple[IO[bytes], _Dict, _Dict]: ...
def parse(
self, stream: IO[bytes], mimetype: Text, content_length: int | None, options: Mapping[str, str] | None = ...
) -> tuple[IO[bytes], _Dict, _Dict]: ...
parse_functions: dict[Text, _ParseFunc]
def is_valid_multipart_boundary(boundary: str) -> bool: ...
def parse_multipart_headers(iterable: Iterable[Text | bytes]) -> Headers: ...
class MultiPartParser(object):
charset: Text
errors: Text
max_form_memory_size: int | None
stream_factory: _StreamFactory
cls: Callable[[], _Dict]
buffer_size: int
def __init__(
self,
stream_factory: _StreamFactory | None = ...,
charset: Text = ...,
errors: Text = ...,
max_form_memory_size: int | None = ...,
cls: Callable[[], _Dict] | None = ...,
buffer_size: int = ...,
) -> None: ...
def fail(self, message: Text) -> NoReturn: ...
def get_part_encoding(self, headers: Mapping[str, str]) -> str | None: ...
def get_part_charset(self, headers: Mapping[str, str]) -> Text: ...
def start_file_streaming(
self, filename: Text | bytes, headers: Mapping[str, str], total_content_length: int | None
) -> tuple[Text, IO[bytes]]: ...
def in_memory_threshold_reached(self, bytes: Any) -> NoReturn: ...
def validate_boundary(self, boundary: str | None) -> None: ...
def parse_lines(
self, file: Any, boundary: bytes, content_length: int, cap_at_buffer: bool = ...
) -> Generator[tuple[str, Any], None, None]: ...
def parse_parts(self, file: Any, boundary: bytes, content_length: int) -> Generator[tuple[str, Any], None, None]: ...
def parse(self, file: Any, boundary: bytes, content_length: int) -> tuple[_Dict, _Dict]: ...

View File

@@ -1,120 +0,0 @@
import sys
from _typeshed.wsgi import WSGIEnvironment
from datetime import datetime, timedelta
from typing import Any, Callable, Iterable, Mapping, SupportsInt, Text, Tuple, Type, TypeVar, Union, overload
from .datastructures import (
Accept,
Authorization,
ContentRange,
ETags,
Headers,
HeaderSet,
IfRange,
Range,
RequestCacheControl,
TypeConversionDict,
WWWAuthenticate,
)
if sys.version_info >= (3, 0):
_Str = str
_ToBytes = Union[bytes, bytearray, memoryview, str]
_ETagData = Union[bytes, bytearray, memoryview]
else:
_Str = TypeVar("_Str", str, unicode)
_ToBytes = Union[bytes, bytearray, buffer, unicode]
_ETagData = Union[str, unicode, bytearray, buffer, memoryview]
_T = TypeVar("_T")
_U = TypeVar("_U")
HTTP_STATUS_CODES: dict[int, str]
def wsgi_to_bytes(data: bytes | Text) -> bytes: ...
def bytes_to_wsgi(data: bytes) -> str: ...
def quote_header_value(value: Any, extra_chars: str = ..., allow_token: bool = ...) -> str: ...
def unquote_header_value(value: _Str, is_filename: bool = ...) -> _Str: ...
def dump_options_header(header: _Str | None, options: Mapping[_Str, Any]) -> _Str: ...
def dump_header(iterable: Iterable[Any] | dict[_Str, Any], allow_token: bool = ...) -> _Str: ...
def parse_list_header(value: _Str) -> list[_Str]: ...
@overload
def parse_dict_header(value: bytes | Text) -> dict[Text, Text | None]: ...
@overload
def parse_dict_header(value: bytes | Text, cls: Type[_T]) -> _T: ...
@overload
def parse_options_header(value: None, multiple: bool = ...) -> tuple[str, dict[str, str | None]]: ...
@overload
def parse_options_header(value: _Str) -> tuple[_Str, dict[_Str, _Str | None]]: ...
# actually returns Tuple[_Str, dict[_Str, _Str | None], ...]
@overload
def parse_options_header(value: _Str, multiple: bool = ...) -> Tuple[Any, ...]: ...
@overload
def parse_accept_header(value: Text | None) -> Accept: ...
@overload
def parse_accept_header(value: _Str | None, cls: Callable[[list[tuple[str, float]] | None], _T]) -> _T: ...
@overload
def parse_cache_control_header(
value: None | bytes | Text, on_update: Callable[[RequestCacheControl], Any] | None = ...
) -> RequestCacheControl: ...
@overload
def parse_cache_control_header(
value: None | bytes | Text, on_update: _T, cls: Callable[[dict[Text, Text | None], _T], _U]
) -> _U: ...
@overload
def parse_cache_control_header(value: None | bytes | Text, *, cls: Callable[[dict[Text, Text | None], None], _U]) -> _U: ...
def parse_set_header(value: Text, on_update: Callable[[HeaderSet], Any] | None = ...) -> HeaderSet: ...
def parse_authorization_header(value: None | bytes | Text) -> Authorization | None: ...
def parse_www_authenticate_header(
value: None | bytes | Text, on_update: Callable[[WWWAuthenticate], Any] | None = ...
) -> WWWAuthenticate: ...
def parse_if_range_header(value: Text | None) -> IfRange: ...
def parse_range_header(value: Text | None, make_inclusive: bool = ...) -> Range | None: ...
def parse_content_range_header(
value: Text | None, on_update: Callable[[ContentRange], Any] | None = ...
) -> ContentRange | None: ...
def quote_etag(etag: _Str, weak: bool = ...) -> _Str: ...
def unquote_etag(etag: _Str | None) -> tuple[_Str | None, _Str | None]: ...
def parse_etags(value: Text | None) -> ETags: ...
def generate_etag(data: _ETagData) -> str: ...
def parse_date(value: str | None) -> datetime | None: ...
def cookie_date(expires: None | float | datetime = ...) -> str: ...
def http_date(timestamp: None | float | datetime = ...) -> str: ...
def parse_age(value: SupportsInt | None = ...) -> timedelta | None: ...
def dump_age(age: None | timedelta | SupportsInt) -> str | None: ...
def is_resource_modified(
environ: WSGIEnvironment,
etag: Text | None = ...,
data: _ETagData | None = ...,
last_modified: None | Text | datetime = ...,
ignore_if_range: bool = ...,
) -> bool: ...
def remove_entity_headers(headers: list[tuple[Text, Text]] | Headers, allowed: Iterable[Text] = ...) -> None: ...
def remove_hop_by_hop_headers(headers: list[tuple[Text, Text]] | Headers) -> None: ...
def is_entity_header(header: Text) -> bool: ...
def is_hop_by_hop_header(header: Text) -> bool: ...
@overload
def parse_cookie(
header: None | WSGIEnvironment | Text | bytes, charset: Text = ..., errors: Text = ...
) -> TypeConversionDict[Any, Any]: ...
@overload
def parse_cookie(
header: None | WSGIEnvironment | Text | bytes,
charset: Text = ...,
errors: Text = ...,
cls: Callable[[Iterable[tuple[Text, Text]]], _T] | None = ...,
) -> _T: ...
def dump_cookie(
key: _ToBytes,
value: _ToBytes = ...,
max_age: None | float | timedelta = ...,
expires: None | Text | float | datetime = ...,
path: None | Tuple[Any, ...] | str | bytes = ...,
domain: None | str | bytes = ...,
secure: bool = ...,
httponly: bool = ...,
charset: Text = ...,
sync_expires: bool = ...,
) -> str: ...
def is_byte_range_valid(start: int | None, stop: int | None, length: int | None) -> bool: ...

View File

@@ -1,100 +0,0 @@
from typing import Any
def release_local(local): ...
class Local:
def __init__(self): ...
def __iter__(self): ...
def __call__(self, proxy): ...
def __release_local__(self): ...
def __getattr__(self, name): ...
def __setattr__(self, name, value): ...
def __delattr__(self, name): ...
class LocalStack:
def __init__(self): ...
def __release_local__(self): ...
def _get__ident_func__(self): ...
def _set__ident_func__(self, value): ...
__ident_func__: Any
def __call__(self): ...
def push(self, obj): ...
def pop(self): ...
@property
def top(self): ...
class LocalManager:
locals: Any
ident_func: Any
def __init__(self, locals: Any | None = ..., ident_func: Any | None = ...): ...
def get_ident(self): ...
def cleanup(self): ...
def make_middleware(self, app): ...
def middleware(self, func): ...
class LocalProxy:
def __init__(self, local, name: Any | None = ...): ...
@property
def __dict__(self): ...
def __bool__(self): ...
def __unicode__(self): ...
def __dir__(self): ...
def __getattr__(self, name): ...
def __setitem__(self, key, value): ...
def __delitem__(self, key): ...
__getslice__: Any
def __setslice__(self, i, j, seq): ...
def __delslice__(self, i, j): ...
__setattr__: Any
__delattr__: Any
__lt__: Any
__le__: Any
__eq__: Any
__ne__: Any
__gt__: Any
__ge__: Any
__cmp__: Any
__hash__: Any
__call__: Any
__len__: Any
__getitem__: Any
__iter__: Any
__contains__: Any
__add__: Any
__sub__: Any
__mul__: Any
__floordiv__: Any
__mod__: Any
__divmod__: Any
__pow__: Any
__lshift__: Any
__rshift__: Any
__and__: Any
__xor__: Any
__or__: Any
__div__: Any
__truediv__: Any
__neg__: Any
__pos__: Any
__abs__: Any
__invert__: Any
__complex__: Any
__int__: Any
__long__: Any
__float__: Any
__oct__: Any
__hex__: Any
__index__: Any
__coerce__: Any
__enter__: Any
__exit__: Any
__radd__: Any
__rsub__: Any
__rmul__: Any
__rdiv__: Any
__rtruediv__: Any
__rfloordiv__: Any
__rmod__: Any
__rdivmod__: Any
__copy__: Any
__deepcopy__: Any

View File

@@ -1,8 +0,0 @@
from _typeshed.wsgi import StartResponse, WSGIApplication, WSGIEnvironment
from typing import Iterable, Mapping, Text
class DispatcherMiddleware(object):
app: WSGIApplication
mounts: Mapping[Text, WSGIApplication]
def __init__(self, app: WSGIApplication, mounts: Mapping[Text, WSGIApplication] | None = ...) -> None: ...
def __call__(self, environ: WSGIEnvironment, start_response: StartResponse) -> Iterable[bytes]: ...

View File

@@ -1,14 +0,0 @@
from _typeshed.wsgi import StartResponse, WSGIApplication, WSGIEnvironment
from typing import Any, Iterable, Mapping, MutableMapping, Text
_Opts = Mapping[Text, Any]
_MutableOpts = MutableMapping[Text, Any]
class ProxyMiddleware(object):
app: WSGIApplication
targets: dict[Text, _MutableOpts]
def __init__(
self, app: WSGIApplication, targets: Mapping[Text, _MutableOpts], chunk_size: int = ..., timeout: int = ...
) -> None: ...
def proxy_to(self, opts: _Opts, path: Text, prefix: Text) -> WSGIApplication: ...
def __call__(self, environ: WSGIEnvironment, start_response: StartResponse) -> Iterable[bytes]: ...

View File

@@ -1,62 +0,0 @@
import sys
from _typeshed import SupportsWrite
from _typeshed.wsgi import StartResponse, WSGIApplication, WSGIEnvironment
from typing import Any, Iterable, Iterator, Mapping, Protocol, Tuple
from ..datastructures import Headers
class WSGIWarning(Warning): ...
class HTTPWarning(Warning): ...
def check_string(context: str, obj: object, stacklevel: int = ...) -> None: ...
class _SupportsReadEtc(Protocol):
def read(self, __size: int = ...) -> bytes: ...
def readline(self, __size: int = ...) -> bytes: ...
def __iter__(self) -> Iterator[bytes]: ...
def close(self) -> Any: ...
class InputStream(object):
def __init__(self, stream: _SupportsReadEtc) -> None: ...
def read(self, __size: int = ...) -> bytes: ...
def readline(self, __size: int = ...) -> bytes: ...
def __iter__(self) -> Iterator[bytes]: ...
def close(self) -> None: ...
class _SupportsWriteEtc(Protocol):
def write(self, __s: str) -> Any: ...
def flush(self) -> Any: ...
def close(self) -> Any: ...
class ErrorStream(object):
def __init__(self, stream: _SupportsWriteEtc) -> None: ...
def write(self, s: str) -> None: ...
def flush(self) -> None: ...
def writelines(self, seq: Iterable[str]) -> None: ...
def close(self) -> None: ...
class GuardedWrite(object):
def __init__(self, write: SupportsWrite[str], chunks: list[int]) -> None: ...
def __call__(self, s: str) -> None: ...
class GuardedIterator(object):
closed: bool
headers_set: bool
chunks: list[int]
def __init__(self, iterator: Iterable[str], headers_set: bool, chunks: list[int]) -> None: ...
def __iter__(self) -> GuardedIterator: ...
if sys.version_info >= (3, 0):
def __next__(self) -> str: ...
else:
def next(self) -> str: ...
def close(self) -> None: ...
class LintMiddleware(object):
def __init__(self, app: WSGIApplication) -> None: ...
def check_environ(self, environ: WSGIEnvironment) -> None: ...
def check_start_response(
self, status: str, headers: list[tuple[str, str]], exc_info: Tuple[Any, ...] | None
) -> tuple[int, Headers]: ...
def check_headers(self, headers: Mapping[str, str]) -> None: ...
def check_iterator(self, app_iter: Iterable[bytes]) -> None: ...
def __call__(self, environ: WSGIEnvironment, start_response: StartResponse) -> GuardedIterator: ...

View File

@@ -1,14 +0,0 @@
from _typeshed.wsgi import StartResponse, WSGIApplication, WSGIEnvironment
from typing import IO, Iterable, Text
class ProfilerMiddleware(object):
def __init__(
self,
app: WSGIApplication,
stream: IO[str] = ...,
sort_by: tuple[Text, Text] = ...,
restrictions: Iterable[str | float] = ...,
profile_dir: Text | None = ...,
filename_format: Text = ...,
) -> None: ...
def __call__(self, environ: WSGIEnvironment, start_response: StartResponse) -> list[bytes]: ...

View File

@@ -1,23 +0,0 @@
from _typeshed.wsgi import StartResponse, WSGIApplication, WSGIEnvironment
from typing import Iterable
class ProxyFix(object):
app: WSGIApplication
x_for: int
x_proto: int
x_host: int
x_port: int
x_prefix: int
num_proxies: int
def __init__(
self,
app: WSGIApplication,
num_proxies: int | None = ...,
x_for: int = ...,
x_proto: int = ...,
x_host: int = ...,
x_port: int = ...,
x_prefix: int = ...,
) -> None: ...
def get_remote_addr(self, forwarded_for: Iterable[str]) -> str | None: ...
def __call__(self, environ: WSGIEnvironment, start_response: StartResponse) -> Iterable[bytes]: ...

View File

@@ -1,29 +0,0 @@
import datetime
from _typeshed.wsgi import StartResponse, WSGIApplication, WSGIEnvironment
from typing import IO, Callable, Iterable, Mapping, Optional, Text, Tuple, Union
_V = Union[Tuple[Text, Text], Text]
_Opener = Callable[[], Tuple[IO[bytes], datetime.datetime, int]]
_Loader = Callable[[Optional[Text]], Union[Tuple[None, None], Tuple[Text, _Opener]]]
class SharedDataMiddleware(object):
app: WSGIApplication
exports: list[tuple[Text, _Loader]]
cache: bool
cache_timeout: float
def __init__(
self,
app: WSGIApplication,
exports: Mapping[Text, _V] | Iterable[tuple[Text, _V]],
disallow: Text | None = ...,
cache: bool = ...,
cache_timeout: float = ...,
fallback_mimetype: Text = ...,
) -> None: ...
def is_allowed(self, filename: Text) -> bool: ...
def get_file_loader(self, filename: Text) -> _Loader: ...
def get_package_loader(self, package: Text, package_path: Text) -> _Loader: ...
def get_directory_loader(self, directory: Text) -> _Loader: ...
def generate_etag(self, mtime: datetime.datetime, file_size: int, real_filename: Text | bytes) -> str: ...
def __call__(self, environment: WSGIEnvironment, start_response: StartResponse) -> WSGIApplication: ...

View File

@@ -1,8 +0,0 @@
from typing import Any
from ._compat import to_unicode as to_unicode
from .filesystem import get_filesystem_encoding as get_filesystem_encoding
can_rename_open_file: Any
def rename(src, dst): ...

View File

@@ -1,219 +0,0 @@
from typing import Any, Text
from werkzeug.exceptions import HTTPException
def parse_converter_args(argstr): ...
def parse_rule(rule): ...
class RoutingException(Exception): ...
class RequestRedirect(HTTPException, RoutingException):
code: Any
new_url: Any
def __init__(self, new_url): ...
def get_response(self, environ): ...
class RequestSlash(RoutingException): ...
class RequestAliasRedirect(RoutingException):
matched_values: Any
def __init__(self, matched_values): ...
class BuildError(RoutingException, LookupError):
endpoint: Any
values: Any
method: Any
adapter: MapAdapter | None
def __init__(self, endpoint, values, method, adapter: MapAdapter | None = ...) -> None: ...
@property
def suggested(self) -> Rule | None: ...
def closest_rule(self, adapter: MapAdapter | None) -> Rule | None: ...
class ValidationError(ValueError): ...
class RuleFactory:
def get_rules(self, map): ...
class Subdomain(RuleFactory):
subdomain: Any
rules: Any
def __init__(self, subdomain, rules): ...
def get_rules(self, map): ...
class Submount(RuleFactory):
path: Any
rules: Any
def __init__(self, path, rules): ...
def get_rules(self, map): ...
class EndpointPrefix(RuleFactory):
prefix: Any
rules: Any
def __init__(self, prefix, rules): ...
def get_rules(self, map): ...
class RuleTemplate:
rules: Any
def __init__(self, rules): ...
def __call__(self, *args, **kwargs): ...
class RuleTemplateFactory(RuleFactory):
rules: Any
context: Any
def __init__(self, rules, context): ...
def get_rules(self, map): ...
class Rule(RuleFactory):
rule: Any
is_leaf: Any
map: Any
strict_slashes: Any
subdomain: Any
host: Any
defaults: Any
build_only: Any
alias: Any
methods: Any
endpoint: Any
redirect_to: Any
arguments: Any
def __init__(
self,
string,
defaults: Any | None = ...,
subdomain: Any | None = ...,
methods: Any | None = ...,
build_only: bool = ...,
endpoint: Any | None = ...,
strict_slashes: Any | None = ...,
redirect_to: Any | None = ...,
alias: bool = ...,
host: Any | None = ...,
): ...
def empty(self): ...
def get_empty_kwargs(self): ...
def get_rules(self, map): ...
def refresh(self): ...
def bind(self, map, rebind: bool = ...): ...
def get_converter(self, variable_name, converter_name, args, kwargs): ...
def compile(self): ...
def match(self, path, method: Any | None = ...): ...
def build(self, values, append_unknown: bool = ...): ...
def provides_defaults_for(self, rule): ...
def suitable_for(self, values, method: Any | None = ...): ...
def match_compare_key(self): ...
def build_compare_key(self): ...
def __eq__(self, other): ...
def __ne__(self, other): ...
class BaseConverter:
regex: Any
weight: Any
map: Any
def __init__(self, map): ...
def to_python(self, value): ...
def to_url(self, value) -> str: ...
class UnicodeConverter(BaseConverter):
regex: Any
def __init__(self, map, minlength: int = ..., maxlength: Any | None = ..., length: Any | None = ...): ...
class AnyConverter(BaseConverter):
regex: Any
def __init__(self, map, *items): ...
class PathConverter(BaseConverter):
regex: Any
weight: Any
class NumberConverter(BaseConverter):
weight: Any
fixed_digits: Any
min: Any
max: Any
def __init__(self, map, fixed_digits: int = ..., min: Any | None = ..., max: Any | None = ...): ...
def to_python(self, value): ...
def to_url(self, value) -> str: ...
class IntegerConverter(NumberConverter):
regex: Any
num_convert: Any
class FloatConverter(NumberConverter):
regex: Any
num_convert: Any
def __init__(self, map, min: Any | None = ..., max: Any | None = ...): ...
class UUIDConverter(BaseConverter):
regex: Any
def to_python(self, value): ...
def to_url(self, value) -> str: ...
DEFAULT_CONVERTERS: Any
class Map:
default_converters: Any
default_subdomain: Any
charset: Text
encoding_errors: Text
strict_slashes: Any
redirect_defaults: Any
host_matching: Any
converters: Any
sort_parameters: Any
sort_key: Any
def __init__(
self,
rules: Any | None = ...,
default_subdomain: str = ...,
charset: Text = ...,
strict_slashes: bool = ...,
redirect_defaults: bool = ...,
converters: Any | None = ...,
sort_parameters: bool = ...,
sort_key: Any | None = ...,
encoding_errors: Text = ...,
host_matching: bool = ...,
): ...
def is_endpoint_expecting(self, endpoint, *arguments): ...
def iter_rules(self, endpoint: Any | None = ...): ...
def add(self, rulefactory): ...
def bind(
self,
server_name,
script_name: Any | None = ...,
subdomain: Any | None = ...,
url_scheme: str = ...,
default_method: str = ...,
path_info: Any | None = ...,
query_args: Any | None = ...,
): ...
def bind_to_environ(self, environ, server_name: Any | None = ..., subdomain: Any | None = ...): ...
def update(self): ...
class MapAdapter:
map: Any
server_name: Any
script_name: Any
subdomain: Any
url_scheme: Any
path_info: Any
default_method: Any
query_args: Any
def __init__(
self, map, server_name, script_name, subdomain, url_scheme, path_info, default_method, query_args: Any | None = ...
): ...
def dispatch(self, view_func, path_info: Any | None = ..., method: Any | None = ..., catch_http_exceptions: bool = ...): ...
def match(
self, path_info: Any | None = ..., method: Any | None = ..., return_rule: bool = ..., query_args: Any | None = ...
): ...
def test(self, path_info: Any | None = ..., method: Any | None = ...): ...
def allowed_methods(self, path_info: Any | None = ...): ...
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: Any | None = ..., domain_part: Any | None = ...): ...
def make_alias_redirect_url(self, path, endpoint, values, method, query_args): ...
def build(
self, endpoint, values: Any | None = ..., method: Any | None = ..., force_external: bool = ..., append_unknown: bool = ...
): ...

View File

@@ -1,24 +0,0 @@
from typing import Any
argument_types: Any
converters: Any
def run(namespace: Any | None = ..., action_prefix: str = ..., args: Any | None = ...): ...
def fail(message, code: int = ...): ...
def find_actions(namespace, action_prefix): ...
def print_usage(actions): ...
def analyse_action(func): ...
def make_shell(init_func: Any | None = ..., banner: Any | None = ..., 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: Any | None = ...,
extra_files: Any | None = ...,
ssl_context: Any | None = ...,
): ...

View File

@@ -1,12 +0,0 @@
from typing import Any
SALT_CHARS: Any
DEFAULT_PBKDF2_ITERATIONS: Any
def pbkdf2_hex(data, salt, iterations=..., keylen: Any | None = ..., hashfunc: Any | None = ...): ...
def pbkdf2_bin(data, salt, iterations=..., keylen: Any | None = ..., hashfunc: Any | None = ...): ...
def safe_str_cmp(a, b): ...
def gen_salt(length): ...
def generate_password_hash(password, method: str = ..., salt_length: int = ...): ...
def check_password_hash(pwhash, password): ...
def safe_join(directory, filename): ...

View File

@@ -1,140 +0,0 @@
import sys
from typing import Any
if sys.version_info >= (3, 0):
from http.server import BaseHTTPRequestHandler, HTTPServer
from socketserver import ThreadingMixIn
else:
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
from SocketServer import ThreadingMixIn
if sys.platform == "win32":
class ForkingMixIn(object): ...
else:
if sys.version_info >= (3, 0):
from socketserver import ForkingMixIn as ForkingMixIn
else:
from SocketServer import ForkingMixIn as ForkingMixIn
class _SslDummy:
def __getattr__(self, name): ...
ssl: Any
LISTEN_QUEUE: Any
can_open_by_fd: Any
class WSGIRequestHandler(BaseHTTPRequestHandler):
@property
def server_version(self): ...
def make_environ(self): ...
environ: Any
close_connection: Any
def run_wsgi(self): ...
def handle(self): ...
def initiate_shutdown(self): ...
def connection_dropped(self, error, environ: Any | None = ...): ...
raw_requestline: Any
def handle_one_request(self): ...
def send_response(self, code, message: Any | None = ...): ...
def version_string(self): ...
def address_string(self): ...
def port_integer(self): ...
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: Any
def generate_adhoc_ssl_pair(cn: Any | None = ...): ...
def make_ssl_devcert(base_path, host: Any | None = ..., cn: Any | None = ...): ...
def generate_adhoc_ssl_context(): ...
def load_ssl_context(cert_file, pkey_file: Any | None = ..., protocol: Any | None = ...): ...
class _SSLContext:
def __init__(self, protocol): ...
def load_cert_chain(self, certfile, keyfile: Any | None = ..., password: Any | None = ...): ...
def wrap_socket(self, sock, **kwargs): ...
def is_ssl_error(error: Any | None = ...): ...
def select_ip_version(host, port): ...
class BaseWSGIServer(HTTPServer):
multithread: Any
multiprocess: Any
request_queue_size: Any
address_family: Any
app: Any
passthrough_errors: Any
shutdown_signal: Any
host: Any
port: Any
socket: Any
server_address: Any
ssl_context: Any
def __init__(
self,
host,
port,
app,
handler: Any | None = ...,
passthrough_errors: bool = ...,
ssl_context: Any | None = ...,
fd: Any | None = ...,
): ...
def log(self, type, message, *args): ...
def serve_forever(self): ...
def handle_error(self, request, client_address): ...
def get_request(self): ...
class ThreadedWSGIServer(ThreadingMixIn, BaseWSGIServer):
multithread: Any
daemon_threads: Any
class ForkingWSGIServer(ForkingMixIn, BaseWSGIServer):
multiprocess: Any
max_children: Any
def __init__(
self,
host,
port,
app,
processes: int = ...,
handler: Any | None = ...,
passthrough_errors: bool = ...,
ssl_context: Any | None = ...,
fd: Any | None = ...,
): ...
def make_server(
host: Any | None = ...,
port: Any | None = ...,
app: Any | None = ...,
threaded: bool = ...,
processes: int = ...,
request_handler: Any | None = ...,
passthrough_errors: bool = ...,
ssl_context: Any | None = ...,
fd: Any | None = ...,
): ...
def is_running_from_reloader(): ...
def run_simple(
hostname,
port,
application,
use_reloader: bool = ...,
use_debugger: bool = ...,
use_evalex: bool = ...,
extra_files: Any | None = ...,
reloader_interval: int = ...,
reloader_type: str = ...,
threaded: bool = ...,
processes: int = ...,
request_handler: Any | None = ...,
static_files: Any | None = ...,
passthrough_errors: bool = ...,
ssl_context: Any | None = ...,
): ...
def run_with_reloader(*args, **kwargs): ...
def main(): ...

View File

@@ -1,169 +0,0 @@
import sys
from _typeshed.wsgi import WSGIEnvironment
from typing import Any, Generic, Text, Type, TypeVar, overload
from typing_extensions import Literal
if sys.version_info >= (3, 0):
from http.cookiejar import CookieJar
from urllib.request import Request as U2Request
else:
from cookielib import CookieJar
from urllib2 import Request as U2Request
def stream_encode_multipart(values, use_tempfile: int = ..., threshold=..., boundary: Any | None = ..., charset: Text = ...): ...
def encode_multipart(values, boundary: Any | None = ..., charset: Text = ...): ...
def File(fd, filename: Any | None = ..., mimetype: Any | None = ...): ...
class _TestCookieHeaders:
headers: Any
def __init__(self, headers): ...
def getheaders(self, name): ...
def get_all(self, name, default: Any | None = ...): ...
class _TestCookieResponse:
headers: Any
def __init__(self, headers): ...
def info(self): ...
class _TestCookieJar(CookieJar):
def inject_wsgi(self, environ): ...
def extract_wsgi(self, environ, headers): ...
class EnvironBuilder:
server_protocol: Any
wsgi_version: Any
request_class: Any
charset: Text
path: Any
base_url: Any
query_string: Any
args: Any
method: Any
headers: Any
content_type: Any
errors_stream: Any
multithread: Any
multiprocess: Any
run_once: Any
environ_base: Any
environ_overrides: Any
input_stream: Any
content_length: Any
closed: Any
def __init__(
self,
path: str = ...,
base_url: Any | None = ...,
query_string: Any | None = ...,
method: str = ...,
input_stream: Any | None = ...,
content_type: Any | None = ...,
content_length: Any | None = ...,
errors_stream: Any | None = ...,
multithread: bool = ...,
multiprocess: bool = ...,
run_once: bool = ...,
headers: Any | None = ...,
data: Any | None = ...,
environ_base: Any | None = ...,
environ_overrides: Any | None = ...,
charset: Text = ...,
): ...
form: Any
files: Any
@property
def server_name(self) -> str: ...
@property
def server_port(self) -> int: ...
def __del__(self) -> None: ...
def close(self) -> None: ...
def get_environ(self) -> WSGIEnvironment: ...
def get_request(self, cls: Any | None = ...): ...
class ClientRedirectError(Exception): ...
# Response type for the client below.
# By default _R is Tuple[Iterable[Any], Text | int, datastructures.Headers]
_R = TypeVar("_R")
class Client(Generic[_R]):
application: Any
response_wrapper: Type[_R] | None
cookie_jar: Any
allow_subdomain_redirects: Any
def __init__(
self, application, response_wrapper: Type[_R] | None = ..., use_cookies: bool = ..., allow_subdomain_redirects: bool = ...
): ...
def set_cookie(
self,
server_name,
key,
value: str = ...,
max_age: Any | None = ...,
expires: Any | None = ...,
path: str = ...,
domain: Any | None = ...,
secure: Any | None = ...,
httponly: bool = ...,
charset: Text = ...,
): ...
def delete_cookie(self, server_name, key, path: str = ..., domain: Any | None = ...): ...
def run_wsgi_app(self, environ, buffered: bool = ...): ...
def resolve_redirect(self, response, new_location, environ, buffered: bool = ...): ...
@overload
def open(self, *args, as_tuple: Literal[True], **kwargs) -> tuple[WSGIEnvironment, _R]: ...
@overload
def open(self, *args, as_tuple: Literal[False] = ..., **kwargs) -> _R: ...
@overload
def open(self, *args, as_tuple: bool, **kwargs) -> Any: ...
@overload
def get(self, *args, as_tuple: Literal[True], **kw) -> tuple[WSGIEnvironment, _R]: ...
@overload
def get(self, *args, as_tuple: Literal[False] = ..., **kw) -> _R: ...
@overload
def get(self, *args, as_tuple: bool, **kw) -> Any: ...
@overload
def patch(self, *args, as_tuple: Literal[True], **kw) -> tuple[WSGIEnvironment, _R]: ...
@overload
def patch(self, *args, as_tuple: Literal[False] = ..., **kw) -> _R: ...
@overload
def patch(self, *args, as_tuple: bool, **kw) -> Any: ...
@overload
def post(self, *args, as_tuple: Literal[True], **kw) -> tuple[WSGIEnvironment, _R]: ...
@overload
def post(self, *args, as_tuple: Literal[False] = ..., **kw) -> _R: ...
@overload
def post(self, *args, as_tuple: bool, **kw) -> Any: ...
@overload
def head(self, *args, as_tuple: Literal[True], **kw) -> tuple[WSGIEnvironment, _R]: ...
@overload
def head(self, *args, as_tuple: Literal[False] = ..., **kw) -> _R: ...
@overload
def head(self, *args, as_tuple: bool, **kw) -> Any: ...
@overload
def put(self, *args, as_tuple: Literal[True], **kw) -> tuple[WSGIEnvironment, _R]: ...
@overload
def put(self, *args, as_tuple: Literal[False] = ..., **kw) -> _R: ...
@overload
def put(self, *args, as_tuple: bool, **kw) -> Any: ...
@overload
def delete(self, *args, as_tuple: Literal[True], **kw) -> tuple[WSGIEnvironment, _R]: ...
@overload
def delete(self, *args, as_tuple: Literal[False] = ..., **kw) -> _R: ...
@overload
def delete(self, *args, as_tuple: bool, **kw) -> Any: ...
@overload
def options(self, *args, as_tuple: Literal[True], **kw) -> tuple[WSGIEnvironment, _R]: ...
@overload
def options(self, *args, as_tuple: Literal[False] = ..., **kw) -> _R: ...
@overload
def options(self, *args, as_tuple: bool, **kw) -> Any: ...
@overload
def trace(self, *args, as_tuple: Literal[True], **kw) -> tuple[WSGIEnvironment, _R]: ...
@overload
def trace(self, *args, as_tuple: Literal[False] = ..., **kw) -> _R: ...
@overload
def trace(self, *args, as_tuple: bool, **kw) -> Any: ...
def create_environ(*args, **kwargs): ...
def run_wsgi_app(app, environ, buffered: bool = ...): ...

View File

@@ -1,10 +0,0 @@
from typing import Any
from werkzeug.wrappers import BaseRequest as Request, BaseResponse as Response
logo: Any
TEMPLATE: Any
def iter_sys_path(): ...
def render_testapp(req): ...
def test_app(environ, start_response): ...

View File

@@ -1,94 +0,0 @@
from typing import Any, NamedTuple, Text
class _URLTuple(NamedTuple):
scheme: Any
netloc: Any
path: Any
query: Any
fragment: Any
class BaseURL(_URLTuple):
def replace(self, **kwargs): ...
@property
def host(self): ...
@property
def ascii_host(self): ...
@property
def port(self): ...
@property
def auth(self): ...
@property
def username(self): ...
@property
def raw_username(self): ...
@property
def password(self): ...
@property
def raw_password(self): ...
def decode_query(self, *args, **kwargs): ...
def join(self, *args, **kwargs): ...
def to_url(self): ...
def decode_netloc(self): ...
def to_uri_tuple(self): ...
def to_iri_tuple(self): ...
def get_file_location(self, pathformat: Any | None = ...): ...
class URL(BaseURL):
def encode_netloc(self): ...
def encode(self, charset: Text = ..., errors: Text = ...): ...
class BytesURL(BaseURL):
def encode_netloc(self): ...
def decode(self, charset: Text = ..., errors: Text = ...): ...
def url_parse(url, scheme: Any | None = ..., 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: 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: Any | None = ...,
): ...
def url_decode_stream(
stream,
charset: Text = ...,
decode_keys: bool = ...,
include_empty: bool = ...,
errors: Text = ...,
separator: str = ...,
cls: Any | None = ...,
limit: Any | None = ...,
return_iterator: bool = ...,
): ...
def url_encode(
obj, charset: Text = ..., encode_keys: bool = ..., sort: bool = ..., key: Any | None = ..., separator: bytes = ...
): ...
def url_encode_stream(
obj,
stream: Any | None = ...,
charset: Text = ...,
encode_keys: bool = ...,
sort: bool = ...,
key: Any | None = ...,
separator: bytes = ...,
): ...
def url_join(base, url, allow_fragments: bool = ...): ...
class Href:
base: Any
charset: Text
sort: Any
key: Any
def __init__(self, base: str = ..., charset: Text = ..., sort: bool = ..., key: Any | None = ...): ...
def __getattr__(self, name): ...
def __call__(self, *path, **query): ...

View File

@@ -1,18 +0,0 @@
from typing import Any
class UserAgentParser:
platforms: Any
browsers: Any
def __init__(self): ...
def __call__(self, user_agent): ...
class UserAgent:
string: Any
platform: str | None
browser: str | None
version: str | None
language: str | None
def __init__(self, environ_or_string): ...
def to_header(self): ...
def __nonzero__(self): ...
__bool__: Any

View File

@@ -1,59 +0,0 @@
from typing import Any, Text, Type, TypeVar, overload
from werkzeug._internal import _DictAccessorProperty
from werkzeug.wrappers import Response
class cached_property(property):
__name__: Any
__module__: Any
__doc__: Any
func: Any
def __init__(self, func, name: Any | None = ..., doc: Any | None = ...): ...
def __set__(self, obj, value): ...
def __get__(self, obj, type: Any | None = ...): ...
class environ_property(_DictAccessorProperty):
read_only: Any
def lookup(self, obj): ...
class header_property(_DictAccessorProperty):
def lookup(self, obj): ...
class HTMLBuilder:
def __init__(self, dialect): ...
def __call__(self, s): ...
def __getattr__(self, tag): ...
html: Any
xhtml: Any
def get_content_type(mimetype, charset): ...
def format_string(string, context): ...
def secure_filename(filename: Text) -> Text: ...
def escape(s, quote: Any | None = ...): ...
def unescape(s): ...
# 'redirect' returns a werkzeug Response, unless you give it
# another Response type to use instead.
_RC = TypeVar("_RC", bound=Response)
@overload
def redirect(location: str, code: int = ..., Response: None = ...) -> Response: ...
@overload
def redirect(location: str, code: int = ..., Response: Type[_RC] = ...) -> _RC: ...
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: Any
extra: Any
extra_positional: Any
def __init__(self, missing: Any | None = ..., extra: Any | None = ..., extra_positional: Any | None = ...): ...
class ImportStringError(ImportError):
import_name: Any
exception: Any
def __init__(self, import_name, exception): ...

View File

@@ -1,274 +0,0 @@
from _typeshed.wsgi import InputStream, WSGIEnvironment
from datetime import datetime, timedelta
from typing import Any, Callable, Iterable, Iterator, Mapping, MutableMapping, Sequence, Text, Type, TypeVar, overload
from typing_extensions import Literal
from .datastructures import (
Accept,
Authorization,
CharsetAccept,
CombinedMultiDict,
EnvironHeaders,
Headers,
HeaderSet,
ImmutableMultiDict,
ImmutableTypeConversionDict,
LanguageAccept,
MIMEAccept,
MultiDict,
)
from .useragents import UserAgent
class BaseRequest:
charset: str
encoding_errors: str
max_content_length: int | None
max_form_memory_size: int
parameter_storage_class: Type[Any]
list_storage_class: Type[Any]
dict_storage_class: Type[Any]
form_data_parser_class: Type[Any]
trusted_hosts: Sequence[Text] | None
disable_data_descriptor: Any
environ: WSGIEnvironment = ...
shallow: Any
def __init__(self, environ: WSGIEnvironment, populate_request: bool = ..., shallow: bool = ...) -> None: ...
@property
def url_charset(self) -> str: ...
@classmethod
def from_values(cls, *args, **kwargs) -> BaseRequest: ...
@classmethod
def application(cls, f): ...
@property
def want_form_data_parsed(self): ...
def make_form_data_parser(self): ...
def close(self) -> None: ...
def __enter__(self): ...
def __exit__(self, exc_type, exc_value, tb): ...
@property
def stream(self) -> InputStream: ...
input_stream: InputStream
args: ImmutableMultiDict[Any, Any]
@property
def data(self) -> bytes: ...
@overload
def get_data(self, cache: bool = ..., as_text: Literal[False] = ..., parse_form_data: bool = ...) -> bytes: ...
@overload
def get_data(self, cache: bool, as_text: Literal[True], parse_form_data: bool = ...) -> Text: ...
@overload
def get_data(self, *, as_text: Literal[True], parse_form_data: bool = ...) -> Text: ...
@overload
def get_data(self, cache: bool, as_text: bool, parse_form_data: bool = ...) -> Any: ...
@overload
def get_data(self, *, as_text: bool, parse_form_data: bool = ...) -> Any: ...
form: ImmutableMultiDict[Any, Any]
values: CombinedMultiDict[Any, Any]
files: MultiDict[Any, Any]
@property
def cookies(self) -> ImmutableTypeConversionDict[str, str]: ...
headers: EnvironHeaders
path: Text
full_path: Text
script_root: Text
url: Text
base_url: Text
url_root: Text
host_url: Text
host: Text
query_string: bytes
method: Text
@property
def access_route(self) -> Sequence[str]: ...
@property
def remote_addr(self) -> str: ...
remote_user: Text
scheme: str
is_xhr: bool
is_secure: bool
is_multithread: bool
is_multiprocess: bool
is_run_once: bool
_OnCloseT = TypeVar("_OnCloseT", bound=Callable[[], Any])
_SelfT = TypeVar("_SelfT", bound=BaseResponse)
class BaseResponse:
charset: str
default_status: int
default_mimetype: str | None
implicit_sequence_conversion: bool
autocorrect_location_header: bool
automatically_set_content_length: bool
headers: Headers
status_code: int
status: str
direct_passthrough: bool
response: Iterable[bytes]
def __init__(
self,
response: str | bytes | bytearray | Iterable[str] | Iterable[bytes] | None = ...,
status: Text | int | None = ...,
headers: Headers | Mapping[Text, Text] | Sequence[tuple[Text, Text]] | None = ...,
mimetype: Text | None = ...,
content_type: Text | None = ...,
direct_passthrough: bool = ...,
) -> None: ...
def call_on_close(self, func: _OnCloseT) -> _OnCloseT: ...
@classmethod
def force_type(cls: Type[_SelfT], response: object, environ: WSGIEnvironment | None = ...) -> _SelfT: ...
@classmethod
def from_app(cls: Type[_SelfT], app: Any, environ: WSGIEnvironment, buffered: bool = ...) -> _SelfT: ...
@overload
def get_data(self, as_text: Literal[False] = ...) -> bytes: ...
@overload
def get_data(self, as_text: Literal[True]) -> Text: ...
@overload
def get_data(self, as_text: bool) -> Any: ...
def set_data(self, value: bytes | Text) -> None: ...
data: Any
def calculate_content_length(self) -> int | None: ...
def make_sequence(self) -> None: ...
def iter_encoded(self) -> Iterator[bytes]: ...
def set_cookie(
self,
key: str,
value: str | bytes = ...,
max_age: float | timedelta | None = ...,
expires: int | datetime | None = ...,
path: str = ...,
domain: str | None = ...,
secure: bool = ...,
httponly: bool = ...,
samesite: str | None = ...,
) -> None: ...
def delete_cookie(self, key, path: str = ..., domain: Any | None = ...): ...
@property
def is_streamed(self) -> bool: ...
@property
def is_sequence(self) -> bool: ...
def close(self) -> None: ...
def __enter__(self): ...
def __exit__(self, exc_type, exc_value, tb): ...
# The no_etag argument if fictional, but required for compatibility with
# ETagResponseMixin
def freeze(self, no_etag: bool = ...) -> None: ...
def get_wsgi_headers(self, environ): ...
def get_app_iter(self, environ): ...
def get_wsgi_response(self, environ): ...
def __call__(self, environ, start_response): ...
class AcceptMixin(object):
@property
def accept_mimetypes(self) -> MIMEAccept: ...
@property
def accept_charsets(self) -> CharsetAccept: ...
@property
def accept_encodings(self) -> Accept: ...
@property
def accept_languages(self) -> LanguageAccept: ...
class ETagRequestMixin:
@property
def cache_control(self): ...
@property
def if_match(self): ...
@property
def if_none_match(self): ...
@property
def if_modified_since(self): ...
@property
def if_unmodified_since(self): ...
@property
def if_range(self): ...
@property
def range(self): ...
class UserAgentMixin:
@property
def user_agent(self) -> UserAgent: ...
class AuthorizationMixin:
@property
def authorization(self) -> Authorization | None: ...
class StreamOnlyMixin:
disable_data_descriptor: Any
want_form_data_parsed: Any
class ETagResponseMixin:
@property
def cache_control(self): ...
status_code: Any
def make_conditional(self, request_or_environ, accept_ranges: bool = ..., complete_length: Any | None = ...): ...
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: Any
content_range: Any
class ResponseStream:
mode: Any
response: Any
closed: Any
def __init__(self, response): ...
def write(self, value): ...
def writelines(self, seq): ...
def close(self): ...
def flush(self): ...
def isatty(self): ...
@property
def encoding(self): ...
class ResponseStreamMixin:
@property
def stream(self) -> ResponseStream: ...
class CommonRequestDescriptorsMixin:
@property
def content_type(self) -> str | None: ...
@property
def content_length(self) -> int | None: ...
@property
def content_encoding(self) -> str | None: ...
@property
def content_md5(self) -> str | None: ...
@property
def referrer(self) -> str | None: ...
@property
def date(self) -> datetime | None: ...
@property
def max_forwards(self) -> int | None: ...
@property
def mimetype(self) -> str: ...
@property
def mimetype_params(self) -> Mapping[str, str]: ...
@property
def pragma(self) -> HeaderSet: ...
class CommonResponseDescriptorsMixin:
mimetype: str | None = ...
@property
def mimetype_params(self) -> MutableMapping[str, str]: ...
location: str | None = ...
age: Any = ... # get: datetime.timedelta | None
content_type: str | None = ...
content_length: int | None = ...
content_location: str | None = ...
content_encoding: str | None = ...
content_md5: str | None = ...
date: Any = ... # get: datetime.datetime | None
expires: Any = ... # get: datetime.datetime | None
last_modified: Any = ... # get: datetime.datetime | None
retry_after: Any = ... # get: datetime.datetime | None
vary: str | None = ...
content_language: str | None = ...
allow: str | None = ...
class WWWAuthenticateMixin:
@property
def www_authenticate(self): ...
class Request(BaseRequest, AcceptMixin, ETagRequestMixin, UserAgentMixin, AuthorizationMixin, CommonRequestDescriptorsMixin): ...
class PlainRequest(StreamOnlyMixin, Request): ...
class Response(BaseResponse, ETagResponseMixin, ResponseStreamMixin, CommonResponseDescriptorsMixin, WWWAuthenticateMixin): ...

View File

@@ -1,74 +0,0 @@
from _typeshed import SupportsRead
from _typeshed.wsgi import InputStream, WSGIEnvironment
from typing import Any, Iterable, Text
from .middleware.dispatcher import DispatcherMiddleware as DispatcherMiddleware
from .middleware.http_proxy import ProxyMiddleware as ProxyMiddleware
from .middleware.shared_data import SharedDataMiddleware as SharedDataMiddleware
def responder(f): ...
def get_current_url(
environ, root_only: bool = ..., strip_querystring: bool = ..., host_only: bool = ..., trusted_hosts: Any | None = ...
): ...
def host_is_trusted(hostname, trusted_list): ...
def get_host(environ, trusted_hosts: Any | None = ...): ...
def get_content_length(environ: WSGIEnvironment) -> int | None: ...
def get_input_stream(environ: WSGIEnvironment, safe_fallback: bool = ...) -> InputStream: ...
def get_query_string(environ): ...
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 ClosingIterator:
def __init__(self, iterable, callbacks: Any | None = ...): ...
def __iter__(self): ...
def __next__(self): ...
def close(self): ...
def wrap_file(environ: WSGIEnvironment, file: SupportsRead[bytes], buffer_size: int = ...) -> Iterable[bytes]: ...
class FileWrapper:
file: SupportsRead[bytes]
buffer_size: int
def __init__(self, file: SupportsRead[bytes], buffer_size: int = ...) -> None: ...
def close(self) -> None: ...
def seekable(self) -> bool: ...
def seek(self, offset: int, whence: int = ...) -> None: ...
def tell(self) -> int | None: ...
def __iter__(self) -> FileWrapper: ...
def __next__(self) -> bytes: ...
class _RangeWrapper:
iterable: Any
byte_range: Any
start_byte: Any
end_byte: Any
read_length: Any
seekable: Any
end_reached: Any
def __init__(self, iterable, start_byte: int = ..., byte_range: Any | None = ...): ...
def __iter__(self): ...
def __next__(self): ...
def close(self): ...
def make_line_iter(stream, limit: Any | None = ..., buffer_size=..., cap_at_buffer: bool = ...): ...
def make_chunk_iter(stream, separator, limit: Any | None = ..., buffer_size=..., cap_at_buffer: bool = ...): ...
class LimitedStream:
limit: Any
def __init__(self, stream, limit): ...
def __iter__(self): ...
@property
def is_exhausted(self): ...
def on_exhausted(self): ...
def on_disconnect(self): ...
def exhaust(self, chunk_size=...): ...
def read(self, size: Any | None = ...): ...
def readline(self, size: Any | None = ...): ...
def readlines(self, size: Any | None = ...): ...
def tell(self): ...
def __next__(self): ...

View File

@@ -1,19 +0,0 @@
click.Argument.__init__
click.Context.__init__
click.Parameter.__init__
click._termui_impl.ProgressBar.__init__
click.command
click.core.Argument.__init__
click.core.Context.__init__
click.core.Parameter.__init__
click.decorators.command
click.decorators.group
click.decorators.pass_context
click.decorators.pass_obj
click.group
click.pass_context
click.pass_obj
click.secho
click.termui._build_prompt
click.termui.secho
click.testing.clickpkg

Some files were not shown because too many files have changed in this diff Show More