mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-23 19:41:51 +08:00
Use PEP 604 syntax wherever possible (#7493)
This commit is contained in:
@@ -1,26 +1,11 @@
|
||||
import email.message
|
||||
from types import TracebackType
|
||||
from typing import (
|
||||
IO,
|
||||
Any,
|
||||
AnyStr,
|
||||
Callable,
|
||||
Generic,
|
||||
Iterable,
|
||||
Iterator,
|
||||
Mapping,
|
||||
Protocol,
|
||||
Sequence,
|
||||
Text,
|
||||
TypeVar,
|
||||
Union,
|
||||
overload,
|
||||
)
|
||||
from typing import IO, Any, AnyStr, Callable, Generic, Iterable, Iterator, Mapping, Protocol, Sequence, Text, TypeVar, overload
|
||||
from typing_extensions import Literal
|
||||
|
||||
_T = TypeVar("_T")
|
||||
_MessageT = TypeVar("_MessageT", bound=Message)
|
||||
_MessageData = Union[email.message.Message, bytes, str, IO[str], IO[bytes]]
|
||||
_MessageData = email.message.Message | bytes | str | IO[str] | IO[bytes]
|
||||
|
||||
class _HasIteritems(Protocol):
|
||||
def iteritems(self) -> Iterator[tuple[str, _MessageData]]: ...
|
||||
|
||||
Reference in New Issue
Block a user