From bf7d6f6a272f41cc8c3139e9aee12cc01b4edd7e Mon Sep 17 00:00:00 2001 From: Tushar Sadhwani Date: Fri, 30 Apr 2021 23:35:06 +0530 Subject: [PATCH] Fix `re.split(...)` return type (#5269) --- stdlib/re.pyi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stdlib/re.pyi b/stdlib/re.pyi index e690e76586a0..3f2490ae4e11 100644 --- a/stdlib/re.pyi +++ b/stdlib/re.pyi @@ -70,9 +70,9 @@ def fullmatch(pattern: AnyStr, string: AnyStr, flags: _FlagsType = ...) -> Optio @overload def fullmatch(pattern: Pattern[AnyStr], string: AnyStr, flags: _FlagsType = ...) -> Optional[Match[AnyStr]]: ... @overload -def split(pattern: AnyStr, string: AnyStr, maxsplit: int = ..., flags: _FlagsType = ...) -> List[AnyStr]: ... +def split(pattern: AnyStr, string: AnyStr, maxsplit: int = ..., flags: _FlagsType = ...) -> List[Union[AnyStr, Any]]: ... @overload -def split(pattern: Pattern[AnyStr], string: AnyStr, maxsplit: int = ..., flags: _FlagsType = ...) -> List[AnyStr]: ... +def split(pattern: Pattern[AnyStr], string: AnyStr, maxsplit: int = ..., flags: _FlagsType = ...) -> List[Union[AnyStr, Any]]: ... @overload def findall(pattern: AnyStr, string: AnyStr, flags: _FlagsType = ...) -> List[Any]: ... @overload