mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-06 20:24:30 +08:00
email.mime: add policy arguments (#3827)
This commit is contained in:
@@ -1,11 +1,28 @@
|
||||
# Stubs for email.mime.application (Python 3.4)
|
||||
|
||||
from typing import Callable, Optional, Tuple, Union
|
||||
import sys
|
||||
from email.mime.nonmultipart import MIMENonMultipart
|
||||
from email.policy import Policy
|
||||
from typing import Callable, Optional, Tuple, Union
|
||||
|
||||
_ParamsType = Union[str, None, Tuple[str, Optional[str], str]]
|
||||
|
||||
class MIMEApplication(MIMENonMultipart):
|
||||
def __init__(self, _data: Union[str, bytes], _subtype: str = ...,
|
||||
_encoder: Callable[[MIMEApplication], None] = ...,
|
||||
**_params: _ParamsType) -> None: ...
|
||||
if sys.version_info >= (3, 6):
|
||||
def __init__(
|
||||
self,
|
||||
_data: Union[str, bytes],
|
||||
_subtype: str = ...,
|
||||
_encoder: Callable[[MIMEApplication], None] = ...,
|
||||
*,
|
||||
policy: Optional[Policy] = ...,
|
||||
**_params: _ParamsType,
|
||||
) -> None: ...
|
||||
else:
|
||||
def __init__(
|
||||
self,
|
||||
_data: Union[str, bytes],
|
||||
_subtype: str = ...,
|
||||
_encoder: Callable[[MIMEApplication], None] = ...,
|
||||
**_params: _ParamsType,
|
||||
) -> None: ...
|
||||
|
||||
@@ -1,11 +1,28 @@
|
||||
# Stubs for email.mime.audio (Python 3.4)
|
||||
|
||||
from typing import Callable, Optional, Tuple, Union
|
||||
import sys
|
||||
from email.mime.nonmultipart import MIMENonMultipart
|
||||
from email.policy import Policy
|
||||
from typing import Callable, Optional, Tuple, Union
|
||||
|
||||
_ParamsType = Union[str, None, Tuple[str, Optional[str], str]]
|
||||
|
||||
class MIMEAudio(MIMENonMultipart):
|
||||
def __init__(self, _audiodata: Union[str, bytes], _subtype: Optional[str] = ...,
|
||||
_encoder: Callable[[MIMEAudio], None] = ...,
|
||||
**_params: _ParamsType) -> None: ...
|
||||
if sys.version_info >= (3, 6):
|
||||
def __init__(
|
||||
self,
|
||||
_audiodata: Union[str, bytes],
|
||||
_subtype: Optional[str] = ...,
|
||||
_encoder: Callable[[MIMEAudio], None] = ...,
|
||||
*,
|
||||
policy: Optional[Policy] = ...,
|
||||
**_params: _ParamsType,
|
||||
) -> None: ...
|
||||
else:
|
||||
def __init__(
|
||||
self,
|
||||
_audiodata: Union[str, bytes],
|
||||
_subtype: Optional[str] = ...,
|
||||
_encoder: Callable[[MIMEAudio], None] = ...,
|
||||
**_params: _ParamsType,
|
||||
) -> None: ...
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
# Stubs for email.mime.base (Python 3.4)
|
||||
|
||||
from typing import Optional, Tuple, Union
|
||||
import email.message
|
||||
import sys
|
||||
from email.policy import Policy
|
||||
from typing import Optional, Tuple, Union
|
||||
|
||||
_ParamsType = Union[str, None, Tuple[str, Optional[str], str]]
|
||||
|
||||
class MIMEBase(email.message.Message):
|
||||
def __init__(self, _maintype: str, _subtype: str,
|
||||
**_params: _ParamsType) -> None: ...
|
||||
if sys.version_info >= (3, 6):
|
||||
def __init__(self, _maintype: str, _subtype: str, *, policy: Optional[Policy] = ..., **_params: _ParamsType) -> None: ...
|
||||
else:
|
||||
def __init__(self, _maintype: str, _subtype: str, **_params: _ParamsType) -> None: ...
|
||||
|
||||
@@ -1,11 +1,28 @@
|
||||
# Stubs for email.mime.image (Python 3.4)
|
||||
|
||||
from typing import Callable, Optional, Tuple, Union
|
||||
import sys
|
||||
from email.mime.nonmultipart import MIMENonMultipart
|
||||
from email.policy import Policy
|
||||
from typing import Callable, Optional, Tuple, Union
|
||||
|
||||
_ParamsType = Union[str, None, Tuple[str, Optional[str], str]]
|
||||
|
||||
class MIMEImage(MIMENonMultipart):
|
||||
def __init__(self, _imagedata: Union[str, bytes], _subtype: Optional[str] = ...,
|
||||
_encoder: Callable[[MIMEImage], None] = ...,
|
||||
**_params: _ParamsType) -> None: ...
|
||||
if sys.version_info >= (3, 6):
|
||||
def __init__(
|
||||
self,
|
||||
_imagedata: Union[str, bytes],
|
||||
_subtype: Optional[str] = ...,
|
||||
_encoder: Callable[[MIMEImage], None] = ...,
|
||||
*,
|
||||
policy: Optional[Policy] = ...,
|
||||
**_params: _ParamsType,
|
||||
) -> None: ...
|
||||
else:
|
||||
def __init__(
|
||||
self,
|
||||
_imagedata: Union[str, bytes],
|
||||
_subtype: Optional[str] = ...,
|
||||
_encoder: Callable[[MIMEImage], None] = ...,
|
||||
**_params: _ParamsType,
|
||||
) -> None: ...
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
# Stubs for email.mime.message (Python 3.4)
|
||||
|
||||
import sys
|
||||
from email.message import Message
|
||||
from email.mime.nonmultipart import MIMENonMultipart
|
||||
from email.policy import Policy
|
||||
from typing import Optional
|
||||
|
||||
class MIMEMessage(MIMENonMultipart):
|
||||
def __init__(self, _msg: Message, _subtype: str = ...) -> None: ...
|
||||
if sys.version_info >= (3, 6):
|
||||
def __init__(self, _msg: Message, _subtype: str = ..., *, policy: Optional[Policy] = ...) -> None: ...
|
||||
else:
|
||||
def __init__(self, _msg: Message, _subtype: str = ...) -> None: ...
|
||||
|
||||
@@ -1,12 +1,29 @@
|
||||
# Stubs for email.mime.multipart (Python 3.4)
|
||||
|
||||
from typing import Optional, Sequence, Tuple, Union
|
||||
import sys
|
||||
from email.message import Message
|
||||
from email.mime.base import MIMEBase
|
||||
from email.policy import Policy
|
||||
from typing import Optional, Sequence, Tuple, Union
|
||||
|
||||
_ParamsType = Union[str, None, Tuple[str, Optional[str], str]]
|
||||
|
||||
class MIMEMultipart(MIMEBase):
|
||||
def __init__(self, _subtype: str = ..., boundary: Optional[str] = ...,
|
||||
_subparts: Optional[Sequence[Message]] = ...,
|
||||
**_params: _ParamsType) -> None: ...
|
||||
if sys.version_info >= (3, 6):
|
||||
def __init__(
|
||||
self,
|
||||
_subtype: str = ...,
|
||||
boundary: Optional[str] = ...,
|
||||
_subparts: Optional[Sequence[Message]] = ...,
|
||||
*,
|
||||
policy: Optional[Policy] = ...,
|
||||
**_params: _ParamsType,
|
||||
) -> None: ...
|
||||
else:
|
||||
def __init__(
|
||||
self,
|
||||
_subtype: str = ...,
|
||||
boundary: Optional[str] = ...,
|
||||
_subparts: Optional[Sequence[Message]] = ...,
|
||||
**_params: _ParamsType,
|
||||
) -> None: ...
|
||||
|
||||
@@ -1,8 +1,14 @@
|
||||
# Stubs for email.mime.text (Python 3.4)
|
||||
|
||||
from typing import Optional
|
||||
import sys
|
||||
from email.mime.nonmultipart import MIMENonMultipart
|
||||
from email.policy import Policy
|
||||
from typing import Optional
|
||||
|
||||
class MIMEText(MIMENonMultipart):
|
||||
def __init__(self, _text: str, _subtype: str = ...,
|
||||
_charset: Optional[str] = ...) -> None: ...
|
||||
if sys.version_info >= (3, 6):
|
||||
def __init__(
|
||||
self, _text: str, _subtype: str = ..., _charset: Optional[str] = ..., *, policy: Optional[Policy] = ...
|
||||
) -> None: ...
|
||||
else:
|
||||
def __init__(self, _text: str, _subtype: str = ..., _charset: Optional[str] = ...) -> None: ...
|
||||
|
||||
@@ -27,8 +27,6 @@ collections.abc.AsyncGenerator.ag_running
|
||||
copy.PyStringMap
|
||||
ctypes.CDLL.__init__
|
||||
email.message.MIMEPart.as_string
|
||||
email.mime.message.MIMEMessage.__init__
|
||||
email.mime.text.MIMEText.__init__
|
||||
enum.Enum._generate_next_value_
|
||||
gettext.NullTranslations.npgettext
|
||||
gettext.NullTranslations.pgettext
|
||||
|
||||
@@ -45,8 +45,6 @@ dataclasses.dataclass
|
||||
dataclasses.field
|
||||
dataclasses.make_dataclass
|
||||
email.message.MIMEPart.as_string
|
||||
email.mime.message.MIMEMessage.__init__
|
||||
email.mime.text.MIMEText.__init__
|
||||
enum.Enum._generate_next_value_
|
||||
gettext.NullTranslations.npgettext
|
||||
gettext.NullTranslations.pgettext
|
||||
|
||||
@@ -99,8 +99,6 @@ decimal.Decimal.from_float
|
||||
decimal.setcontext
|
||||
dis.stack_effect
|
||||
email.message.MIMEPart.as_string
|
||||
email.mime.message.MIMEMessage.__init__
|
||||
email.mime.text.MIMEText.__init__
|
||||
enum.Enum._generate_next_value_
|
||||
functools.partialmethod.__get__
|
||||
gettext.install
|
||||
|
||||
Reference in New Issue
Block a user