mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-16 00:37:10 +08:00
Fix return type of re.match, re.search (#1886)
This commit is contained in:
@@ -498,9 +498,9 @@ class Pattern(Generic[AnyStr]):
|
||||
pattern = ... # type: AnyStr
|
||||
|
||||
def search(self, string: AnyStr, pos: int = ...,
|
||||
endpos: int = ...) -> Match[AnyStr]: ...
|
||||
endpos: int = ...) -> Optional[Match[AnyStr]]: ...
|
||||
def match(self, string: AnyStr, pos: int = ...,
|
||||
endpos: int = ...) -> Match[AnyStr]: ...
|
||||
endpos: int = ...) -> Optional[Match[AnyStr]]: ...
|
||||
# New in Python 3.4
|
||||
def fullmatch(self, string: AnyStr, pos: int = ...,
|
||||
endpos: int = ...) -> Optional[Match[AnyStr]]: ...
|
||||
|
||||
Reference in New Issue
Block a user