mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-19 18:31:14 +08:00
Add re fullmatch() information (#381)
This commit is contained in:
committed by
Guido van Rossum
parent
918eef43f7
commit
44b367c7fe
@@ -7,7 +7,7 @@
|
||||
|
||||
from typing import (
|
||||
List, Iterator, overload, Callable, Tuple, Sequence, Dict,
|
||||
Generic, AnyStr, Match, Pattern, Any
|
||||
Generic, AnyStr, Match, Pattern, Any, Optional
|
||||
)
|
||||
|
||||
# ----- re variables and constants -----
|
||||
@@ -44,6 +44,12 @@ def match(pattern: AnyStr, string: AnyStr, flags: int = ...) -> Match[AnyStr]: .
|
||||
@overload
|
||||
def match(pattern: Pattern[AnyStr], string: AnyStr, flags: int = ...) -> Match[AnyStr]: ...
|
||||
|
||||
# New in Python 3.4
|
||||
@overload
|
||||
def fullmatch(pattern: AnyStr, string: AnyStr, flags: int = ...) -> Optional[Match[AnyStr]]: ...
|
||||
@overload
|
||||
def fullmatch(pattern: Pattern[AnyStr], string: AnyStr, flags: int = ...) -> Optional[Match[AnyStr]]: ...
|
||||
|
||||
@overload
|
||||
def split(pattern: AnyStr, string: AnyStr,
|
||||
maxsplit: int = ..., flags: int = ...) -> List[AnyStr]: ...
|
||||
|
||||
@@ -378,6 +378,9 @@ class Pattern(Generic[AnyStr]):
|
||||
endpos: int = ...) -> Match[AnyStr]: ...
|
||||
def match(self, string: AnyStr, pos: int = ...,
|
||||
endpos: int = ...) -> Match[AnyStr]: ...
|
||||
# New in Python 3.4
|
||||
def fullmatch(self, string: AnyStr, pos: int = ...,
|
||||
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