mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 05:51:52 +08:00
re: various fixes (#3746)
* re: mark positional-only args * re: fix escape arg name * re: update whitelist
This commit is contained in:
@@ -406,9 +406,9 @@ class Match(Generic[AnyStr]):
|
||||
|
||||
def groups(self, default: AnyStr = ...) -> Tuple[AnyStr, ...]: ...
|
||||
def groupdict(self, default: AnyStr = ...) -> Dict[str, AnyStr]: ...
|
||||
def start(self, group: Union[int, str] = ...) -> int: ...
|
||||
def end(self, group: Union[int, str] = ...) -> int: ...
|
||||
def span(self, group: Union[int, str] = ...) -> Tuple[int, int]: ...
|
||||
def start(self, __group: Union[int, str] = ...) -> int: ...
|
||||
def end(self, __group: Union[int, str] = ...) -> int: ...
|
||||
def span(self, __group: Union[int, str] = ...) -> Tuple[int, int]: ...
|
||||
@property
|
||||
def regs(self) -> Tuple[Tuple[int, int], ...]: ... # undocumented
|
||||
|
||||
|
||||
@@ -154,7 +154,7 @@ def subn(pattern: Pattern[AnyStr], repl: Callable[[Match[AnyStr]], AnyStr],
|
||||
string: AnyStr, count: int = ...,
|
||||
flags: _FlagsType = ...) -> Tuple[AnyStr, int]: ...
|
||||
|
||||
def escape(string: AnyStr) -> AnyStr: ...
|
||||
def escape(pattern: AnyStr) -> AnyStr: ...
|
||||
|
||||
def purge() -> None: ...
|
||||
def template(pattern: Union[AnyStr, Pattern[AnyStr]], flags: _FlagsType = ...) -> Pattern[AnyStr]: ...
|
||||
|
||||
@@ -559,9 +559,9 @@ class Match(Generic[AnyStr]):
|
||||
|
||||
def groups(self, default: AnyStr = ...) -> Sequence[AnyStr]: ...
|
||||
def groupdict(self, default: AnyStr = ...) -> dict[str, AnyStr]: ...
|
||||
def start(self, group: Union[int, str] = ...) -> int: ...
|
||||
def end(self, group: Union[int, str] = ...) -> int: ...
|
||||
def span(self, group: Union[int, str] = ...) -> Tuple[int, int]: ...
|
||||
def start(self, __group: Union[int, str] = ...) -> int: ...
|
||||
def end(self, __group: Union[int, str] = ...) -> int: ...
|
||||
def span(self, __group: Union[int, str] = ...) -> Tuple[int, int]: ...
|
||||
@property
|
||||
def regs(self) -> Tuple[Tuple[int, int], ...]: ... # undocumented
|
||||
if sys.version_info >= (3, 6):
|
||||
|
||||
Reference in New Issue
Block a user