1 """Stub file for the '_sre' module."""
\r
3 from typing import Any, Union, Iterable, Optional, Mapping, Sequence, Dict, List, Tuple, overload
\r
5 CODESIZE = ... # type: int
\r
6 MAGIC = ... # type: int
\r
7 MAXREPEAT = ... # type: long
\r
8 copyright = ... # type: str
\r
10 class SRE_Match(object):
\r
11 def start(self, group: int = ...) -> int:
\r
13 def end(self, group: int = ...) -> int:
\r
15 def expand(self, s: str) -> Any: ...
\r
17 def group(self) -> str: ...
\r
19 def group(self, group: int = ...) -> Optional[str]: ...
\r
20 def groupdict(self) -> Dict[int, Optional[str]]: ...
\r
21 def groups(self) -> Tuple[Optional[str], ...]: ...
\r
22 def span(self) -> Tuple[int, int]:
\r
25 class SRE_Scanner(object):
\r
26 pattern = ... # type: str
\r
27 def match(self) -> SRE_Match: ...
\r
28 def search(self) -> SRE_Match: ...
\r
30 class SRE_Pattern(object):
\r
31 pattern = ... # type: str
\r
32 flags = ... # type: int
\r
33 groups = ... # type: int
\r
34 groupindex = ... # type: Mapping[str, int]
\r
35 indexgroup = ... # type: Sequence[int]
\r
36 def findall(self, source: str, pos: int = ..., endpos: int = ...) -> List[Union[tuple, str]]: ...
\r
37 def finditer(self, source: str, pos: int = ..., endpos: int = ...) -> Iterable[Union[tuple, str]]: ...
\r
38 def match(self, pattern, pos: int = ..., endpos: int = ...) -> SRE_Match: ...
\r
39 def scanner(self, s: str, start: int = ..., end: int = ...) -> SRE_Scanner: ...
\r
40 def search(self, pattern, pos: int = ..., endpos: int = ...) -> SRE_Match: ...
\r
41 def split(self, source: str, maxsplit: int = ...) -> List[Optional[str]]: ...
\r
42 def sub(self, repl: str, string: str, count: int = ...) -> tuple: ...
\r
43 def subn(self, repl: str, string: str, count: int = ...) -> tuple: ...
\r
45 def compile(pattern: str, flags: int, code: List[int],
\r
47 groupindex: Mapping[str, int] = ...,
\r
48 indexgroup: Sequence[int] = ...) -> SRE_Pattern:
\r
49 raise OverflowError()
\r
51 def getcodesize() -> int: ...
\r
53 def getlower(a: int, b: int) -> int: ...
\r