regex stubs: Add __getitem__ method to Match (#7372)

This commit is contained in:
Joseph Young
2022-02-23 18:38:29 +00:00
committed by GitHub
parent ffeac7297f
commit d3941c2463

View File

@@ -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]):