mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 14:01:55 +08:00
Use TypeAlias where possible for type aliases (#7630)
This commit is contained in:
@@ -3,6 +3,7 @@ import sre_compile
|
||||
import sys
|
||||
from sre_constants import error as error
|
||||
from typing import Any, AnyStr, Callable, Iterator, overload
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
# ----- re variables and constants -----
|
||||
if sys.version_info >= (3, 7):
|
||||
@@ -147,7 +148,7 @@ T = RegexFlag.T
|
||||
TEMPLATE = RegexFlag.TEMPLATE
|
||||
if sys.version_info >= (3, 11):
|
||||
NOFLAG = RegexFlag.NOFLAG
|
||||
_FlagsType = int | RegexFlag
|
||||
_FlagsType: TypeAlias = int | RegexFlag
|
||||
|
||||
if sys.version_info < (3, 7):
|
||||
# undocumented
|
||||
|
||||
Reference in New Issue
Block a user