diff --git a/stubs/regex/regex/_regex.pyi b/stubs/regex/regex/_regex.pyi index bb9de6f1a560..ee5445fd7d80 100644 --- a/stubs/regex/regex/_regex.pyi +++ b/stubs/regex/regex/_regex.pyi @@ -172,6 +172,10 @@ class Match(Generic[AnyStr]): def captures(self, __group1: int | str, __group2: int | str, *groups: int | str) -> tuple[list[AnyStr], ...]: ... def capturesdict(self) -> dict[str, list[AnyStr]]: ... def detach_string(self) -> None: ... + @overload + def __getitem__(self, __key: Literal[0]) -> AnyStr: ... + @overload + def __getitem__(self, __key: int | str) -> AnyStr | Any: ... @final class Splitter(Generic[AnyStr]):