mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-19 23:09:55 +08:00
Use TypeAlias where possible for type aliases (#7630)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import sys
|
||||
from _typeshed import SupportsRead
|
||||
from typing import Any, Callable, Generic, MutableMapping, Pattern, Text, TypeVar, overload
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
_MutableMappingT = TypeVar("_MutableMappingT", bound=MutableMapping[str, Any])
|
||||
|
||||
@@ -8,10 +9,10 @@ if sys.version_info >= (3, 0):
|
||||
from pathlib import PurePath
|
||||
|
||||
FNFError = FileNotFoundError
|
||||
_PathLike = str | bytes | PurePath
|
||||
_PathLike: TypeAlias = str | bytes | PurePath
|
||||
else:
|
||||
FNFError = IOError
|
||||
_PathLike = Text
|
||||
_PathLike: TypeAlias = Text
|
||||
|
||||
TIME_RE: Pattern[str]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user