mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-27 22:31:12 +08:00
@@ -1,3 +1,4 @@
|
||||
import enum
|
||||
import sys
|
||||
from typing import Any, AnyStr, Callable, Iterator, List, Optional, Tuple, Union, overload
|
||||
|
||||
@@ -7,45 +8,7 @@ if sys.version_info >= (3, 7):
|
||||
else:
|
||||
from typing import Match, Pattern
|
||||
|
||||
if sys.version_info >= (3, 6):
|
||||
import enum
|
||||
class RegexFlag(enum.IntFlag):
|
||||
A: int
|
||||
ASCII: int
|
||||
DEBUG: int
|
||||
I: int
|
||||
IGNORECASE: int
|
||||
L: int
|
||||
LOCALE: int
|
||||
M: int
|
||||
MULTILINE: int
|
||||
S: int
|
||||
DOTALL: int
|
||||
X: int
|
||||
VERBOSE: int
|
||||
U: int
|
||||
UNICODE: int
|
||||
T: int
|
||||
TEMPLATE: int
|
||||
A = RegexFlag.A
|
||||
ASCII = RegexFlag.ASCII
|
||||
DEBUG = RegexFlag.DEBUG
|
||||
I = RegexFlag.I
|
||||
IGNORECASE = RegexFlag.IGNORECASE
|
||||
L = RegexFlag.L
|
||||
LOCALE = RegexFlag.LOCALE
|
||||
M = RegexFlag.M
|
||||
MULTILINE = RegexFlag.MULTILINE
|
||||
S = RegexFlag.S
|
||||
DOTALL = RegexFlag.DOTALL
|
||||
X = RegexFlag.X
|
||||
VERBOSE = RegexFlag.VERBOSE
|
||||
U = RegexFlag.U
|
||||
UNICODE = RegexFlag.UNICODE
|
||||
T = RegexFlag.T
|
||||
TEMPLATE = RegexFlag.TEMPLATE
|
||||
_FlagsType = Union[int, RegexFlag]
|
||||
else:
|
||||
class RegexFlag(enum.IntFlag):
|
||||
A: int
|
||||
ASCII: int
|
||||
DEBUG: int
|
||||
@@ -63,7 +26,25 @@ else:
|
||||
UNICODE: int
|
||||
T: int
|
||||
TEMPLATE: int
|
||||
_FlagsType = int
|
||||
|
||||
A = RegexFlag.A
|
||||
ASCII = RegexFlag.ASCII
|
||||
DEBUG = RegexFlag.DEBUG
|
||||
I = RegexFlag.I
|
||||
IGNORECASE = RegexFlag.IGNORECASE
|
||||
L = RegexFlag.L
|
||||
LOCALE = RegexFlag.LOCALE
|
||||
M = RegexFlag.M
|
||||
MULTILINE = RegexFlag.MULTILINE
|
||||
S = RegexFlag.S
|
||||
DOTALL = RegexFlag.DOTALL
|
||||
X = RegexFlag.X
|
||||
VERBOSE = RegexFlag.VERBOSE
|
||||
U = RegexFlag.U
|
||||
UNICODE = RegexFlag.UNICODE
|
||||
T = RegexFlag.T
|
||||
TEMPLATE = RegexFlag.TEMPLATE
|
||||
_FlagsType = Union[int, RegexFlag]
|
||||
|
||||
if sys.version_info < (3, 7):
|
||||
# undocumented
|
||||
|
||||
Reference in New Issue
Block a user