diff --git a/stdlib/re.pyi b/stdlib/re.pyi index 8f63cc199e62..f0a892c797e9 100644 --- a/stdlib/re.pyi +++ b/stdlib/re.pyi @@ -169,7 +169,7 @@ class Pattern(Generic[AnyStr]): @overload def split(self, string: AnyStr, maxsplit: int = 0) -> list[AnyStr | MaybeNone]: ... - # return type depends on the number of groups in the pattern + # return type is either list[str/bytes] or list[tuple[str/bytes, ...]] @overload def findall(self: Pattern[str], string: str, pos: int = 0, endpos: int = sys.maxsize) -> list[Any]: ... @overload @@ -302,6 +302,7 @@ def split( pattern: bytes | Pattern[bytes], string: ReadableBuffer, maxsplit: int = 0, flags: _FlagsType = 0 ) -> list[bytes | MaybeNone]: ... +# return type is either list[str/bytes] or list[tuple[str/bytes, ...]] @overload def findall(pattern: str | Pattern[str], string: str, flags: _FlagsType = 0) -> list[Any]: ... @overload