mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-06 12:14:27 +08:00
In python versions 3.7 and above, re-export Pattern and Match (#3510)
This commit is contained in:
committed by
Jelle Zijlstra
parent
5fdd6ad1a5
commit
359817bde9
@@ -8,10 +8,15 @@
|
||||
import sys
|
||||
from typing import (
|
||||
List, Iterator, overload, Callable, Tuple,
|
||||
AnyStr, Match, Pattern, Any, Optional, Union
|
||||
AnyStr, Any, Optional, Union
|
||||
)
|
||||
|
||||
# ----- re variables and constants -----
|
||||
if sys.version_info >= (3, 7):
|
||||
from typing import Pattern as Pattern, Match as Match
|
||||
else:
|
||||
from typing import Pattern, Match
|
||||
|
||||
if sys.version_info >= (3, 6):
|
||||
import enum
|
||||
class RegexFlag(enum.IntFlag):
|
||||
|
||||
Reference in New Issue
Block a user