Fix return type of re.match, re.search (#1886)

This commit is contained in:
shahin
2018-02-19 09:23:57 -08:00
committed by Jelle Zijlstra
parent 8ecb74012a
commit d3a9650fa1
4 changed files with 13 additions and 13 deletions

View File

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