@@ -74,19 +74,19 @@ class Match(Generic[AnyStr]):
74
74
@overload
75
75
def group (self , __group : Literal [0 ] = 0 ) -> AnyStr : ...
76
76
@overload
77
- def group (self , __group : str | int ) -> AnyStr | Any : ...
77
+ def group (self , __group : str | int ) -> AnyStr | None : ...
78
78
@overload
79
- def group (self , __group1 : str | int , __group2 : str | int , * groups : str | int ) -> tuple [AnyStr | Any , ...]: ...
79
+ def group (self , __group1 : str | int , __group2 : str | int , * groups : str | int ) -> tuple [AnyStr | None , ...]: ...
80
80
# Each item of groups()'s return tuple is either "AnyStr" or
81
81
# "AnyStr | None", depending on the pattern.
82
82
@overload
83
- def groups (self ) -> tuple [AnyStr | Any , ...]: ...
83
+ def groups (self ) -> tuple [AnyStr | None , ...]: ...
84
84
@overload
85
85
def groups (self , default : _T ) -> tuple [AnyStr | _T , ...]: ...
86
86
# Each value in groupdict()'s return dict is either "AnyStr" or
87
87
# "AnyStr | None", depending on the pattern.
88
88
@overload
89
- def groupdict (self ) -> dict [str , AnyStr | Any ]: ...
89
+ def groupdict (self ) -> dict [str , AnyStr | None ]: ...
90
90
@overload
91
91
def groupdict (self , default : _T ) -> dict [str , AnyStr | _T ]: ...
92
92
def start (self , __group : int | str = 0 ) -> int : ...
@@ -98,7 +98,7 @@ class Match(Generic[AnyStr]):
98
98
@overload
99
99
def __getitem__ (self , __key : Literal [0 ]) -> AnyStr : ...
100
100
@overload
101
- def __getitem__ (self , __key : int | str ) -> AnyStr | Any : ...
101
+ def __getitem__ (self , __key : int | str ) -> AnyStr | None : ...
102
102
def __copy__ (self ) -> Match [AnyStr ]: ...
103
103
def __deepcopy__ (self , __memo : Any ) -> Match [AnyStr ]: ...
104
104
if sys .version_info >= (3 , 9 ):
0 commit comments