massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / coc-python-data / languageServer.0.5.59 / Typeshed / third_party / 2and3 / markupsafe / __init__.pyi
1 import sys\r
2 \r
3 from typing import Any, Callable, Dict, Iterable, List, Optional, Sequence, Text, Tuple, Union\r
4 from collections import Mapping\r
5 from markupsafe._compat import text_type\r
6 import string\r
7 from markupsafe._speedups import escape as escape, escape_silent as escape_silent, soft_unicode as soft_unicode\r
8 from markupsafe._native import escape as escape, escape_silent as escape_silent, soft_unicode as soft_unicode\r
9 \r
10 class Markup(text_type):\r
11     def __new__(cls, base: Text = ..., encoding: Optional[Text] = ..., errors: Text = ...) -> Markup: ...\r
12     def __html__(self) -> Markup: ...\r
13     def __add__(self, other: text_type) -> Markup: ...\r
14     def __radd__(self, other: text_type) -> Markup: ...\r
15     def __mul__(self, num: int) -> Markup: ...\r
16     def __rmul__(self, num: int) -> Markup: ...\r
17     def __mod__(self, *args: Any) -> Markup: ...\r
18     def join(self, seq: Iterable[text_type]): ...\r
19     def split(self, sep: Optional[text_type] = ..., maxsplit: int = ...) -> List[text_type]: ...\r
20     def rsplit(self, sep: Optional[text_type] = ..., maxsplit: int = ...) -> List[text_type]: ...\r
21     def splitlines(self, keepends: bool = ...) -> List[text_type]: ...\r
22     def unescape(self) -> Text: ...\r
23     def striptags(self) -> Text: ...\r
24     @classmethod\r
25     def escape(cls, s: text_type) -> Markup: ...\r
26     def partition(self, sep: text_type) -> Tuple[Markup, Markup, Markup]: ...\r
27     def rpartition(self, sep: text_type) -> Tuple[Markup, Markup, Markup]: ...\r
28     def format(*args, **kwargs) -> Markup: ...\r
29     def __html_format__(self, format_spec) -> Markup: ...\r
30     def __getslice__(self, start: int, stop: int) -> Markup: ...\r
31     def __getitem__(self, i: Union[int, slice]) -> Markup: ...\r
32     def capitalize(self) -> Markup: ...\r
33     def title(self) -> Markup: ...\r
34     def lower(self) -> Markup: ...\r
35     def upper(self) -> Markup: ...\r
36     def swapcase(self) -> Markup: ...\r
37     def replace(self, old: text_type, new: text_type, count: int = ...) -> Markup: ...\r
38     def ljust(self, width: int, fillchar: text_type = ...) -> Markup: ...\r
39     def rjust(self, width: int, fillchar: text_type = ...) -> Markup: ...\r
40     def lstrip(self, chars: Optional[text_type] = ...) -> Markup: ...\r
41     def rstrip(self, chars: Optional[text_type] = ...) -> Markup: ...\r
42     def strip(self, chars: Optional[text_type] = ...) -> Markup: ...\r
43     def center(self, width: int, fillchar: text_type = ...) -> Markup: ...\r
44     def zfill(self, width: int) -> Markup: ...\r
45     def translate(self, table: Union[Mapping[int, Union[int, text_type, None]], Sequence[Union[int, text_type, None]]]) -> Markup: ...\r
46     def expandtabs(self, tabsize: int = ...) -> Markup: ...\r
47 \r
48 class EscapeFormatter(string.Formatter):\r
49     escape = ...  # type: Callable[[text_type], Markup]\r
50     def __init__(self, escape: Callable[[text_type], Markup]) -> None: ...\r
51     def format_field(self, value: text_type, format_spec: text_type) -> Markup: ...\r
52 \r
53 if sys.version_info[0] >= 3:\r
54     soft_str = soft_unicode\r