mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
Use TypeAlias where possible for type aliases (#7630)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
from _warnings import warn as warn, warn_explicit as warn_explicit
|
||||
from types import ModuleType, TracebackType
|
||||
from typing import Any, Sequence, TextIO, overload
|
||||
from typing_extensions import Literal
|
||||
from typing_extensions import Literal, TypeAlias
|
||||
|
||||
__all__ = [
|
||||
"warn",
|
||||
@@ -14,7 +14,7 @@ __all__ = [
|
||||
"catch_warnings",
|
||||
]
|
||||
|
||||
_ActionKind = Literal["default", "error", "ignore", "always", "module", "once"]
|
||||
_ActionKind: TypeAlias = Literal["default", "error", "ignore", "always", "module", "once"]
|
||||
|
||||
filters: Sequence[tuple[str, str | None, type[Warning], str | None, int]] # undocumented, do not mutate
|
||||
|
||||
|
||||
Reference in New Issue
Block a user