Fix incorrect markupsafe.Markup return types (#5638)

Closes #5632.
This commit is contained in:
Marius Gedminas
2021-06-15 11:02:33 +03:00
committed by GitHub
parent 03809dc604
commit 524947dbdc

View File

@@ -1,6 +1,6 @@
import string
import sys
from typing import Any, Callable, Iterable, List, Mapping, Optional, Sequence, Text, Tuple, Union
from typing import Any, Callable, Iterable, Mapping, Optional, Sequence, Text, Tuple, Union
from markupsafe._compat import text_type
from markupsafe._native import escape as escape, escape_silent as escape_silent, soft_unicode as soft_unicode
@@ -13,10 +13,10 @@ class Markup(text_type):
def __mul__(self, num: int) -> Markup: ...
def __rmul__(self, num: int) -> Markup: ...
def __mod__(self, *args: Any) -> Markup: ...
def join(self, seq: Iterable[text_type]) -> text_type: ...
def split(self, sep: Optional[text_type] = ..., maxsplit: int = ...) -> List[text_type]: ...
def rsplit(self, sep: Optional[text_type] = ..., maxsplit: int = ...) -> List[text_type]: ...
def splitlines(self, keepends: bool = ...) -> List[text_type]: ...
def join(self, seq: Iterable[text_type]) -> Markup: ...
def split(self, sep: Optional[text_type] = ..., maxsplit: int = ...) -> list[Markup]: ... # type: ignore
def rsplit(self, sep: Optional[text_type] = ..., maxsplit: int = ...) -> list[Markup]: ... # type: ignore
def splitlines(self, keepends: bool = ...) -> list[Markup]: ... # type: ignore
def unescape(self) -> Text: ...
def striptags(self) -> Text: ...
@classmethod