[Updated] D11922: pytype: stop excluding patch.py

mharbison72 (Matt Harbison) phabricator at mercurial-scm.org
Fri Dec 17 11:12:02 UTC 2021


Closed by commit rHG290f9c150f70: pytype: stop excluding patch.py (authored by mharbison72).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D11922?vs=31479&id=31515

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D11922/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D11922

AFFECTED FILES
  mercurial/patch.py
  tests/test-check-pytype.t

CHANGE DETAILS

diff --git a/tests/test-check-pytype.t b/tests/test-check-pytype.t
--- a/tests/test-check-pytype.t
+++ b/tests/test-check-pytype.t
@@ -26,7 +26,6 @@
 mercurial/localrepo.py        # [attribute-error]
 mercurial/manifest.py         # [unsupported-operands], [wrong-arg-types]
 mercurial/minirst.py          # [unsupported-operands], [attribute-error]
-mercurial/patch.py            # [wrong-arg-types]
 mercurial/pure/osutil.py      # [invalid-typevar], [not-callable]
 mercurial/pure/parsers.py     # [attribute-error]
 mercurial/pycompat.py         # bytes vs str issues
@@ -65,7 +64,6 @@
   >    -x mercurial/localrepo.py \
   >    -x mercurial/manifest.py \
   >    -x mercurial/minirst.py \
-  >    -x mercurial/patch.py \
   >    -x mercurial/pure/osutil.py \
   >    -x mercurial/pure/parsers.py \
   >    -x mercurial/pycompat.py \
diff --git a/mercurial/patch.py b/mercurial/patch.py
--- a/mercurial/patch.py
+++ b/mercurial/patch.py
@@ -109,7 +109,9 @@
     def mimesplit(stream, cur):
         def msgfp(m):
             fp = stringio()
+            # pytype: disable=wrong-arg-types
             g = mail.Generator(fp, mangle_from_=False)
+            # pytype: enable=wrong-arg-types
             g.flatten(m)
             fp.seek(0)
             return fp



To: mharbison72, #hg-reviewers, Alphare
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20211217/bdf34973/attachment-0002.html>


More information about the Mercurial-patches mailing list