massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stubs / Werkzeug / werkzeug / utils.pyi
1 from typing import Any, Text, Type, TypeVar, overload
2
3 from werkzeug._internal import _DictAccessorProperty
4 from werkzeug.wrappers import Response
5
6 class cached_property(property):
7     __name__: Any
8     __module__: Any
9     __doc__: Any
10     func: Any
11     def __init__(self, func, name: Any | None = ..., doc: Any | None = ...): ...
12     def __set__(self, obj, value): ...
13     def __get__(self, obj, type: Any | None = ...): ...
14
15 class environ_property(_DictAccessorProperty):
16     read_only: Any
17     def lookup(self, obj): ...
18
19 class header_property(_DictAccessorProperty):
20     def lookup(self, obj): ...
21
22 class HTMLBuilder:
23     def __init__(self, dialect): ...
24     def __call__(self, s): ...
25     def __getattr__(self, tag): ...
26
27 html: Any
28 xhtml: Any
29
30 def get_content_type(mimetype, charset): ...
31 def format_string(string, context): ...
32 def secure_filename(filename: Text) -> Text: ...
33 def escape(s, quote: Any | None = ...): ...
34 def unescape(s): ...
35
36 # 'redirect' returns a werkzeug Response, unless you give it
37 # another Response type to use instead.
38 _RC = TypeVar("_RC", bound=Response)
39
40 @overload
41 def redirect(location: str, code: int = ..., Response: None = ...) -> Response: ...
42 @overload
43 def redirect(location: str, code: int = ..., Response: Type[_RC] = ...) -> _RC: ...
44 def append_slash_redirect(environ, code: int = ...): ...
45 def import_string(import_name, silent: bool = ...): ...
46 def find_modules(import_path, include_packages: bool = ..., recursive: bool = ...): ...
47 def validate_arguments(func, args, kwargs, drop_extra: bool = ...): ...
48 def bind_arguments(func, args, kwargs): ...
49
50 class ArgumentValidationError(ValueError):
51     missing: Any
52     extra: Any
53     extra_positional: Any
54     def __init__(self, missing: Any | None = ..., extra: Any | None = ..., extra_positional: Any | None = ...): ...
55
56 class ImportStringError(ImportError):
57     import_name: Any
58     exception: Any
59     def __init__(self, import_name, exception): ...