From 1537a598d0f35f7396151da3be7dce1ffb04ba46 Mon Sep 17 00:00:00 2001 From: Shantanu <12621235+hauntsaninja@users.noreply.github.com> Date: Sat, 25 Mar 2023 17:42:45 -0700 Subject: [PATCH] email.message: fix return type of get_charsets (#9944) Fixes #9885 --- stdlib/email/message.pyi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stdlib/email/message.pyi b/stdlib/email/message.pyi index 7ca1d5547..18852f4d3 100644 --- a/stdlib/email/message.pyi +++ b/stdlib/email/message.pyi @@ -80,9 +80,9 @@ class Message: @overload def get_content_charset(self, failobj: _T) -> str | _T: ... @overload - def get_charsets(self, failobj: None = None) -> list[str] | None: ... + def get_charsets(self, failobj: None = None) -> list[str | None]: ... @overload - def get_charsets(self, failobj: _T) -> list[str] | _T: ... + def get_charsets(self, failobj: _T) -> list[str | _T]: ... def walk(self) -> Generator[Self, None, None]: ... def get_content_disposition(self) -> str | None: ... def as_string(self, unixfrom: bool = False, maxheaderlen: int = 0, policy: Policy | None = None) -> str: ...