mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
Message.get_content_charset() returns None by default (#9344)
This commit is contained in:
@@ -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: ...
|
||||
|
||||
Reference in New Issue
Block a user