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