Format: application/octet-stream
⬇ Download File (1.9 KB)
   1  from typing import Any, Dict, Iterable, List, Mapping, Optional, Sequence, Tuple, Union, overload
   2  
   3  CODESIZE: int
   4  MAGIC: int
   5  MAXREPEAT: long
   6  copyright: str
   7  
   8  class SRE_Match(object):
   9      def start(self, group: int = ...) -> int: ...
  10      def end(self, group: int = ...) -> int: ...
  11      def expand(self, s: str) -> Any: ...
  12      @overload
  13      def group(self) -> str: ...
  14      @overload
  15      def group(self, group: int = ...) -> Optional[str]: ...
  16      def groupdict(self) -> Dict[int, Optional[str]]: ...
  17      def groups(self) -> Tuple[Optional[str], ...]: ...
  18      def span(self) -> Tuple[int, int]: ...
  19      @property
  20      def regs(self) -> Tuple[Tuple[int, int], ...]: ...  # undocumented
  21  
  22  class SRE_Scanner(object):
  23      pattern: str
  24      def match(self) -> SRE_Match: ...
  25      def search(self) -> SRE_Match: ...
  26  
  27  class SRE_Pattern(object):
  28      pattern: str
  29      flags: int
  30      groups: int
  31      groupindex: Mapping[str, int]
  32      indexgroup: Sequence[int]
  33      def findall(self, source: str, pos: int = ..., endpos: int = ...) -> List[Union[Tuple[Any, ...], str]]: ...
  34      def finditer(self, source: str, pos: int = ..., endpos: int = ...) -> Iterable[Union[Tuple[Any, ...], str]]: ...
  35      def match(self, pattern, pos: int = ..., endpos: int = ...) -> SRE_Match: ...
  36      def scanner(self, s: str, start: int = ..., end: int = ...) -> SRE_Scanner: ...
  37      def search(self, pattern, pos: int = ..., endpos: int = ...) -> SRE_Match: ...
  38      def split(self, source: str, maxsplit: int = ...) -> List[Optional[str]]: ...
  39      def sub(self, repl: str, string: str, count: int = ...) -> Tuple[Any, ...]: ...
  40      def subn(self, repl: str, string: str, count: int = ...) -> Tuple[Any, ...]: ...
  41  
  42  def compile(
  43      pattern: str,
  44      flags: int,
  45      code: List[int],
  46      groups: int = ...,
  47      groupindex: Mapping[str, int] = ...,
  48      indexgroup: Sequence[int] = ...,
  49  ) -> SRE_Pattern: ...
  50  def getcodesize() -> int: ...
  51  def getlower(a: int, b: int) -> int: ...
  52