--- /dev/null
+# Source: https://github.com/python/cpython/blob/master/Lib/sre_constants.py\r
+\r
+from typing import Any, Dict, List, Optional, Union\r
+\r
+MAGIC = ... # type: int\r
+\r
+class error(Exception):\r
+ msg = ... # type: str\r
+ pattern = ... # type: Optional[Union[str, bytes]]\r
+ pos = ... # type: Optional[int]\r
+ lineno = ... # type: int\r
+ colno = ... # type: int\r
+ def __init__(self, msg: str, pattern: Union[str, bytes] = ..., pos: int = ...) -> None: ...\r
+\r
+class _NamedIntConstant(int):\r
+ name = ... # type: Any\r
+ def __new__(cls, value: int, name: str): ...\r
+\r
+MAXREPEAT = ... # type: _NamedIntConstant\r
+OPCODES = ... # type: List[_NamedIntConstant]\r
+ATCODES = ... # type: List[_NamedIntConstant]\r
+CHCODES = ... # type: List[_NamedIntConstant]\r
+OP_IGNORE = ... # type: Dict[_NamedIntConstant, _NamedIntConstant]\r
+AT_MULTILINE = ... # type: Dict[_NamedIntConstant, _NamedIntConstant]\r
+AT_LOCALE = ... # type: Dict[_NamedIntConstant, _NamedIntConstant]\r
+AT_UNICODE = ... # type: Dict[_NamedIntConstant, _NamedIntConstant]\r
+CH_LOCALE = ... # type: Dict[_NamedIntConstant, _NamedIntConstant]\r
+CH_UNICODE = ... # type: Dict[_NamedIntConstant, _NamedIntConstant]\r
+SRE_FLAG_TEMPLATE = ... # type: int\r
+SRE_FLAG_IGNORECASE = ... # type: int\r
+SRE_FLAG_LOCALE = ... # type: int\r
+SRE_FLAG_MULTILINE = ... # type: int\r
+SRE_FLAG_DOTALL = ... # type: int\r
+SRE_FLAG_UNICODE = ... # type: int\r
+SRE_FLAG_VERBOSE = ... # type: int\r
+SRE_FLAG_DEBUG = ... # type: int\r
+SRE_FLAG_ASCII = ... # type: int\r
+SRE_INFO_PREFIX = ... # type: int\r
+SRE_INFO_LITERAL = ... # type: int\r
+SRE_INFO_CHARSET = ... # type: int\r
+\r
+\r
+# Stubgen above; manually defined constants below (dynamic at runtime)\r
+\r
+# from OPCODES\r
+FAILURE = ... # type: _NamedIntConstant\r
+SUCCESS = ... # type: _NamedIntConstant\r
+ANY = ... # type: _NamedIntConstant\r
+ANY_ALL = ... # type: _NamedIntConstant\r
+ASSERT = ... # type: _NamedIntConstant\r
+ASSERT_NOT = ... # type: _NamedIntConstant\r
+AT = ... # type: _NamedIntConstant\r
+BRANCH = ... # type: _NamedIntConstant\r
+CALL = ... # type: _NamedIntConstant\r
+CATEGORY = ... # type: _NamedIntConstant\r
+CHARSET = ... # type: _NamedIntConstant\r
+BIGCHARSET = ... # type: _NamedIntConstant\r
+GROUPREF = ... # type: _NamedIntConstant\r
+GROUPREF_EXISTS = ... # type: _NamedIntConstant\r
+GROUPREF_IGNORE = ... # type: _NamedIntConstant\r
+IN = ... # type: _NamedIntConstant\r
+IN_IGNORE = ... # type: _NamedIntConstant\r
+INFO = ... # type: _NamedIntConstant\r
+JUMP = ... # type: _NamedIntConstant\r
+LITERAL = ... # type: _NamedIntConstant\r
+LITERAL_IGNORE = ... # type: _NamedIntConstant\r
+MARK = ... # type: _NamedIntConstant\r
+MAX_UNTIL = ... # type: _NamedIntConstant\r
+MIN_UNTIL = ... # type: _NamedIntConstant\r
+NOT_LITERAL = ... # type: _NamedIntConstant\r
+NOT_LITERAL_IGNORE = ... # type: _NamedIntConstant\r
+NEGATE = ... # type: _NamedIntConstant\r
+RANGE = ... # type: _NamedIntConstant\r
+REPEAT = ... # type: _NamedIntConstant\r
+REPEAT_ONE = ... # type: _NamedIntConstant\r
+SUBPATTERN = ... # type: _NamedIntConstant\r
+MIN_REPEAT_ONE = ... # type: _NamedIntConstant\r
+RANGE_IGNORE = ... # type: _NamedIntConstant\r
+MIN_REPEAT = ... # type: _NamedIntConstant\r
+MAX_REPEAT = ... # type: _NamedIntConstant\r
+\r
+# from ATCODES\r
+AT_BEGINNING = ... # type: _NamedIntConstant\r
+AT_BEGINNING_LINE = ... # type: _NamedIntConstant\r
+AT_BEGINNING_STRING = ... # type: _NamedIntConstant\r
+AT_BOUNDARY = ... # type: _NamedIntConstant\r
+AT_NON_BOUNDARY = ... # type: _NamedIntConstant\r
+AT_END = ... # type: _NamedIntConstant\r
+AT_END_LINE = ... # type: _NamedIntConstant\r
+AT_END_STRING = ... # type: _NamedIntConstant\r
+AT_LOC_BOUNDARY = ... # type: _NamedIntConstant\r
+AT_LOC_NON_BOUNDARY = ... # type: _NamedIntConstant\r
+AT_UNI_BOUNDARY = ... # type: _NamedIntConstant\r
+AT_UNI_NON_BOUNDARY = ... # type: _NamedIntConstant\r
+\r
+# from CHCODES\r
+CATEGORY_DIGIT = ... # type: _NamedIntConstant\r
+CATEGORY_NOT_DIGIT = ... # type: _NamedIntConstant\r
+CATEGORY_SPACE = ... # type: _NamedIntConstant\r
+CATEGORY_NOT_SPACE = ... # type: _NamedIntConstant\r
+CATEGORY_WORD = ... # type: _NamedIntConstant\r
+CATEGORY_NOT_WORD = ... # type: _NamedIntConstant\r
+CATEGORY_LINEBREAK = ... # type: _NamedIntConstant\r
+CATEGORY_NOT_LINEBREAK = ... # type: _NamedIntConstant\r
+CATEGORY_LOC_WORD = ... # type: _NamedIntConstant\r
+CATEGORY_LOC_NOT_WORD = ... # type: _NamedIntConstant\r
+CATEGORY_UNI_DIGIT = ... # type: _NamedIntConstant\r
+CATEGORY_UNI_NOT_DIGIT = ... # type: _NamedIntConstant\r
+CATEGORY_UNI_SPACE = ... # type: _NamedIntConstant\r
+CATEGORY_UNI_NOT_SPACE = ... # type: _NamedIntConstant\r
+CATEGORY_UNI_WORD = ... # type: _NamedIntConstant\r
+CATEGORY_UNI_NOT_WORD = ... # type: _NamedIntConstant\r
+CATEGORY_UNI_LINEBREAK = ... # type: _NamedIntConstant\r
+CATEGORY_UNI_NOT_LINEBREAK = ... # type: _NamedIntConstant\r