mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-16 00:37:10 +08:00
Use PEP 585 syntax wherever possible (#6717)
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
from email.mime.nonmultipart import MIMENonMultipart
|
||||
from email.policy import Policy
|
||||
from typing import Callable, Optional, Tuple, Union
|
||||
from typing import Callable, Optional, Union
|
||||
|
||||
_ParamsType = Union[str, None, Tuple[str, Optional[str], str]]
|
||||
_ParamsType = Union[str, None, tuple[str, Optional[str], str]]
|
||||
|
||||
class MIMEApplication(MIMENonMultipart):
|
||||
def __init__(
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
from email.mime.nonmultipart import MIMENonMultipart
|
||||
from email.policy import Policy
|
||||
from typing import Callable, Optional, Tuple, Union
|
||||
from typing import Callable, Optional, Union
|
||||
|
||||
_ParamsType = Union[str, None, Tuple[str, Optional[str], str]]
|
||||
_ParamsType = Union[str, None, tuple[str, Optional[str], str]]
|
||||
|
||||
class MIMEAudio(MIMENonMultipart):
|
||||
def __init__(
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import email.message
|
||||
from email.policy import Policy
|
||||
from typing import Optional, Tuple, Union
|
||||
from typing import Optional, Union
|
||||
|
||||
_ParamsType = Union[str, None, Tuple[str, Optional[str], str]]
|
||||
_ParamsType = Union[str, None, tuple[str, Optional[str], str]]
|
||||
|
||||
class MIMEBase(email.message.Message):
|
||||
def __init__(self, _maintype: str, _subtype: str, *, policy: Policy | None = ..., **_params: _ParamsType) -> None: ...
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
from email.mime.nonmultipart import MIMENonMultipart
|
||||
from email.policy import Policy
|
||||
from typing import Callable, Optional, Tuple, Union
|
||||
from typing import Callable, Optional, Union
|
||||
|
||||
_ParamsType = Union[str, None, Tuple[str, Optional[str], str]]
|
||||
_ParamsType = Union[str, None, tuple[str, Optional[str], str]]
|
||||
|
||||
class MIMEImage(MIMENonMultipart):
|
||||
def __init__(
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
from email.message import Message
|
||||
from email.mime.base import MIMEBase
|
||||
from email.policy import Policy
|
||||
from typing import Optional, Sequence, Tuple, Union
|
||||
from typing import Optional, Sequence, Union
|
||||
|
||||
_ParamsType = Union[str, None, Tuple[str, Optional[str], str]]
|
||||
_ParamsType = Union[str, None, tuple[str, Optional[str], str]]
|
||||
|
||||
class MIMEMultipart(MIMEBase):
|
||||
def __init__(
|
||||
|
||||
Reference in New Issue
Block a user