Message.get_content_charset() returns None by default (#9344)

This commit is contained in:
Sebastian Rittau
2022-12-09 16:19:18 +01:00
committed by GitHub
parent 307dd08a6e
commit a74df38df0

View File

@@ -5,7 +5,7 @@ from email.charset import Charset
from email.contentmanager import ContentManager
from email.errors import MessageDefect
from email.policy import Policy
from typing import Any, TypeVar
from typing import Any, TypeVar, overload
from typing_extensions import TypeAlias
__all__ = ["Message", "EmailMessage"]
@@ -54,7 +54,10 @@ class Message:
def get_filename(self, failobj: _T = ...) -> _T | str: ...
def get_boundary(self, failobj: _T = ...) -> _T | str: ...
def set_boundary(self, boundary: str) -> None: ...
def get_content_charset(self, failobj: _T = ...) -> _T | str: ...
@overload
def get_content_charset(self) -> str | None: ...
@overload
def get_content_charset(self, failobj: _T) -> str | _T: ...
def get_charsets(self, failobj: _T = ...) -> _T | list[str]: ...
def walk(self: Self) -> Generator[Self, None, None]: ...
def get_content_disposition(self) -> str | None: ...