f, start: int, stop: int) -> Markup: ...
    def __getitem__(self, i: Union[int, 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: int = ...) -> Markup: ...
    def ljust(self, width: int, fillchar: text_type = ...) -> Markup: ...
    def rjust(self, width: int, fillchar: text_type = ...) -> Markup: ...
    def lstrip(self, chars: Optional[text_type] = ...) -> Markup: ...
    def rstrip(self, chars: Optional[text_type] = ...) -> Markup: ...
    def strip(self, chars: Optional[text_type] = ...) -> Markup: ...
    def center(self, width: int, fillchar: text_type = ...) -> Markup: ...
    def zfill(self, width: int) -> Markup: ...
    def translate(
        self, table: Union[Mapping[int, Union[int, text_type, None]], Sequence[Union[int, text_type, None]]]
    ) -> Markup: ...
    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
PK