mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-06 20:24:30 +08:00
email.mime.application.MIMEApplication expects data to be bytes, while it should be Union[str, bytes] (#2855)
Fixes #2831
This commit is contained in:
committed by
Sebastian Rittau
parent
e4e19d6e98
commit
34cc5545fe
@@ -6,6 +6,6 @@ from email.mime.nonmultipart import MIMENonMultipart
|
||||
_ParamsType = Union[str, None, Tuple[str, Optional[str], str]]
|
||||
|
||||
class MIMEApplication(MIMENonMultipart):
|
||||
def __init__(self, _data: bytes, _subtype: str = ...,
|
||||
def __init__(self, _data: Union[str, bytes], _subtype: str = ...,
|
||||
_encoder: Callable[[MIMEApplication], None] = ...,
|
||||
**_params: _ParamsType) -> None: ...
|
||||
|
||||
@@ -6,6 +6,6 @@ from email.mime.nonmultipart import MIMENonMultipart
|
||||
_ParamsType = Union[str, None, Tuple[str, Optional[str], str]]
|
||||
|
||||
class MIMEAudio(MIMENonMultipart):
|
||||
def __init__(self, _audiodata: bytes, _subtype: Optional[str] = ...,
|
||||
def __init__(self, _audiodata: Union[str, bytes], _subtype: Optional[str] = ...,
|
||||
_encoder: Callable[[MIMEAudio], None] = ...,
|
||||
**_params: _ParamsType) -> None: ...
|
||||
|
||||
@@ -6,6 +6,6 @@ from email.mime.nonmultipart import MIMENonMultipart
|
||||
_ParamsType = Union[str, None, Tuple[str, Optional[str], str]]
|
||||
|
||||
class MIMEImage(MIMENonMultipart):
|
||||
def __init__(self, _imagedata: bytes, _subtype: Optional[str] = ...,
|
||||
def __init__(self, _imagedata: Union[str, bytes], _subtype: Optional[str] = ...,
|
||||
_encoder: Callable[[MIMEImage], None] = ...,
|
||||
**_params: _ParamsType) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user