mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-31 00:24:24 +08:00
Fix return type of re.match, re.search (#1886)
This commit is contained in:
@@ -388,9 +388,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]]: ...
|
||||
def split(self, string: AnyStr, maxsplit: int = ...) -> list[AnyStr]: ...
|
||||
def findall(self, string: AnyStr, pos: int = ...,
|
||||
endpos: int = ...) -> list[Any]: ...
|
||||
|
||||
Reference in New Issue
Block a user