From 524947dbdca8eec5d8fac51337fc7b3eb93b0239 Mon Sep 17 00:00:00 2001 From: Marius Gedminas Date: Tue, 15 Jun 2021 11:02:33 +0300 Subject: [PATCH] Fix incorrect markupsafe.Markup return types (#5638) Closes #5632. --- stubs/MarkupSafe/markupsafe/__init__.pyi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/stubs/MarkupSafe/markupsafe/__init__.pyi b/stubs/MarkupSafe/markupsafe/__init__.pyi index 829490717..1824c4d8e 100644 --- a/stubs/MarkupSafe/markupsafe/__init__.pyi +++ b/stubs/MarkupSafe/markupsafe/__init__.pyi @@ -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