1 # Source: https://github.com/python/cpython/blob/master/Lib/sre_constants.py
\r
3 from typing import Any, Dict, List, Optional, Union
\r
5 MAGIC = ... # type: int
\r
7 class error(Exception):
\r
8 msg = ... # type: str
\r
9 pattern = ... # type: Optional[Union[str, bytes]]
\r
10 pos = ... # type: Optional[int]
\r
11 lineno = ... # type: int
\r
12 colno = ... # type: int
\r
13 def __init__(self, msg: str, pattern: Union[str, bytes] = ..., pos: int = ...) -> None: ...
\r
15 class _NamedIntConstant(int):
\r
16 name = ... # type: Any
\r
17 def __new__(cls, value: int, name: str): ...
\r
19 MAXREPEAT = ... # type: _NamedIntConstant
\r
20 OPCODES = ... # type: List[_NamedIntConstant]
\r
21 ATCODES = ... # type: List[_NamedIntConstant]
\r
22 CHCODES = ... # type: List[_NamedIntConstant]
\r
23 OP_IGNORE = ... # type: Dict[_NamedIntConstant, _NamedIntConstant]
\r
24 AT_MULTILINE = ... # type: Dict[_NamedIntConstant, _NamedIntConstant]
\r
25 AT_LOCALE = ... # type: Dict[_NamedIntConstant, _NamedIntConstant]
\r
26 AT_UNICODE = ... # type: Dict[_NamedIntConstant, _NamedIntConstant]
\r
27 CH_LOCALE = ... # type: Dict[_NamedIntConstant, _NamedIntConstant]
\r
28 CH_UNICODE = ... # type: Dict[_NamedIntConstant, _NamedIntConstant]
\r
29 SRE_FLAG_TEMPLATE = ... # type: int
\r
30 SRE_FLAG_IGNORECASE = ... # type: int
\r
31 SRE_FLAG_LOCALE = ... # type: int
\r
32 SRE_FLAG_MULTILINE = ... # type: int
\r
33 SRE_FLAG_DOTALL = ... # type: int
\r
34 SRE_FLAG_UNICODE = ... # type: int
\r
35 SRE_FLAG_VERBOSE = ... # type: int
\r
36 SRE_FLAG_DEBUG = ... # type: int
\r
37 SRE_FLAG_ASCII = ... # type: int
\r
38 SRE_INFO_PREFIX = ... # type: int
\r
39 SRE_INFO_LITERAL = ... # type: int
\r
40 SRE_INFO_CHARSET = ... # type: int
\r
43 # Stubgen above; manually defined constants below (dynamic at runtime)
\r
46 FAILURE = ... # type: _NamedIntConstant
\r
47 SUCCESS = ... # type: _NamedIntConstant
\r
48 ANY = ... # type: _NamedIntConstant
\r
49 ANY_ALL = ... # type: _NamedIntConstant
\r
50 ASSERT = ... # type: _NamedIntConstant
\r
51 ASSERT_NOT = ... # type: _NamedIntConstant
\r
52 AT = ... # type: _NamedIntConstant
\r
53 BRANCH = ... # type: _NamedIntConstant
\r
54 CALL = ... # type: _NamedIntConstant
\r
55 CATEGORY = ... # type: _NamedIntConstant
\r
56 CHARSET = ... # type: _NamedIntConstant
\r
57 BIGCHARSET = ... # type: _NamedIntConstant
\r
58 GROUPREF = ... # type: _NamedIntConstant
\r
59 GROUPREF_EXISTS = ... # type: _NamedIntConstant
\r
60 GROUPREF_IGNORE = ... # type: _NamedIntConstant
\r
61 IN = ... # type: _NamedIntConstant
\r
62 IN_IGNORE = ... # type: _NamedIntConstant
\r
63 INFO = ... # type: _NamedIntConstant
\r
64 JUMP = ... # type: _NamedIntConstant
\r
65 LITERAL = ... # type: _NamedIntConstant
\r
66 LITERAL_IGNORE = ... # type: _NamedIntConstant
\r
67 MARK = ... # type: _NamedIntConstant
\r
68 MAX_UNTIL = ... # type: _NamedIntConstant
\r
69 MIN_UNTIL = ... # type: _NamedIntConstant
\r
70 NOT_LITERAL = ... # type: _NamedIntConstant
\r
71 NOT_LITERAL_IGNORE = ... # type: _NamedIntConstant
\r
72 NEGATE = ... # type: _NamedIntConstant
\r
73 RANGE = ... # type: _NamedIntConstant
\r
74 REPEAT = ... # type: _NamedIntConstant
\r
75 REPEAT_ONE = ... # type: _NamedIntConstant
\r
76 SUBPATTERN = ... # type: _NamedIntConstant
\r
77 MIN_REPEAT_ONE = ... # type: _NamedIntConstant
\r
78 RANGE_IGNORE = ... # type: _NamedIntConstant
\r
79 MIN_REPEAT = ... # type: _NamedIntConstant
\r
80 MAX_REPEAT = ... # type: _NamedIntConstant
\r
83 AT_BEGINNING = ... # type: _NamedIntConstant
\r
84 AT_BEGINNING_LINE = ... # type: _NamedIntConstant
\r
85 AT_BEGINNING_STRING = ... # type: _NamedIntConstant
\r
86 AT_BOUNDARY = ... # type: _NamedIntConstant
\r
87 AT_NON_BOUNDARY = ... # type: _NamedIntConstant
\r
88 AT_END = ... # type: _NamedIntConstant
\r
89 AT_END_LINE = ... # type: _NamedIntConstant
\r
90 AT_END_STRING = ... # type: _NamedIntConstant
\r
91 AT_LOC_BOUNDARY = ... # type: _NamedIntConstant
\r
92 AT_LOC_NON_BOUNDARY = ... # type: _NamedIntConstant
\r
93 AT_UNI_BOUNDARY = ... # type: _NamedIntConstant
\r
94 AT_UNI_NON_BOUNDARY = ... # type: _NamedIntConstant
\r
97 CATEGORY_DIGIT = ... # type: _NamedIntConstant
\r
98 CATEGORY_NOT_DIGIT = ... # type: _NamedIntConstant
\r
99 CATEGORY_SPACE = ... # type: _NamedIntConstant
\r
100 CATEGORY_NOT_SPACE = ... # type: _NamedIntConstant
\r
101 CATEGORY_WORD = ... # type: _NamedIntConstant
\r
102 CATEGORY_NOT_WORD = ... # type: _NamedIntConstant
\r
103 CATEGORY_LINEBREAK = ... # type: _NamedIntConstant
\r
104 CATEGORY_NOT_LINEBREAK = ... # type: _NamedIntConstant
\r
105 CATEGORY_LOC_WORD = ... # type: _NamedIntConstant
\r
106 CATEGORY_LOC_NOT_WORD = ... # type: _NamedIntConstant
\r
107 CATEGORY_UNI_DIGIT = ... # type: _NamedIntConstant
\r
108 CATEGORY_UNI_NOT_DIGIT = ... # type: _NamedIntConstant
\r
109 CATEGORY_UNI_SPACE = ... # type: _NamedIntConstant
\r
110 CATEGORY_UNI_NOT_SPACE = ... # type: _NamedIntConstant
\r
111 CATEGORY_UNI_WORD = ... # type: _NamedIntConstant
\r
112 CATEGORY_UNI_NOT_WORD = ... # type: _NamedIntConstant
\r
113 CATEGORY_UNI_LINEBREAK = ... # type: _NamedIntConstant
\r
114 CATEGORY_UNI_NOT_LINEBREAK = ... # type: _NamedIntConstant
\r