Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions stdlib/@python2/typing.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -395,8 +395,7 @@ class Match(Generic[AnyStr]):
# string.
re: Pattern[Any]
# Can be None if there are no groups or if the last group was unnamed;
# otherwise matches the type of the pattern.
lastgroup: Any | None
lastgroup: str | None
def expand(self, template: str | Text) -> Any: ...
@overload
def group(self, group1: int = ...) -> AnyStr: ...
Expand All @@ -422,7 +421,7 @@ _AnyStr2 = TypeVar("_AnyStr2", bytes, Text)

class Pattern(Generic[AnyStr]):
flags: int
groupindex: Dict[AnyStr, int]
groupindex: Mapping[str, int]
groups: int
pattern: AnyStr
def search(self, string: _AnyStr2, pos: int = ..., endpos: int = ...) -> Match[_AnyStr2] | None: ...
Expand Down