D7283: mail: suppress a pytype error that's just experimentally wrong
durin42 (Augie Fackler)
phabricator at mercurial-scm.org
Fri Nov 8 16:48:24 UTC 2019
Closed by commit rHG3b31ee5388f3: mail: suppress a pytype error that's just experimentally wrong (authored by durin42).
This revision was automatically updated to reflect the committed changes.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D7283?vs=17653&id=17788
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D7283/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D7283
AFFECTED FILES
mercurial/mail.py
CHANGE DETAILS
diff --git a/mercurial/mail.py b/mercurial/mail.py
--- a/mercurial/mail.py
+++ b/mercurial/mail.py
@@ -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))
To: durin42, #hg-reviewers, indygreg
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list