Mercurial > hg
changeset 43498:3b31ee5388f3
mail: suppress a pytype error that's just experimentally wrong
It's probably more correct to pass a str here, but I'm not going to
worry about it for now.
Differential Revision: https://phab.mercurial-scm.org/D7283
author | Augie Fackler <augie@google.com> |
---|---|
date | Wed, 06 Nov 2019 15:34:40 -0500 |
parents | 6d001f452bcb |
children | 1a47fe4bc154 |
files | mercurial/mail.py |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/mail.py Wed Nov 06 15:12:13 2019 -0500 +++ b/mercurial/mail.py Wed Nov 06 15:34:40 2019 -0500 @@ -279,7 +279,9 @@ '''Return MIME message. Quoted-printable transfer encoding will be used if necessary. ''' - cs = email.charset.Charset(charset) + # Experimentally charset is okay as a bytes even if the type + # stubs disagree. + cs = email.charset.Charset(charset) # pytype: disable=wrong-arg-types msg = email.message.Message() msg.set_type(pycompat.sysstr(b'text/' + subtype))