bundle2: more pytype suppressions around bytestring
authorAugie Fackler <augie@google.com>
Wed, 06 Nov 2019 17:19:33 -0500
changeset 43536 ea25b4673231
parent 43535 d5bef33ab83c
child 43537 ea0b44255a31
bundle2: more pytype suppressions around bytestring We clearly need to work around this somehow. Differential Revision: https://phab.mercurial-scm.org/D7291
mercurial/bundle2.py
--- a/mercurial/bundle2.py	Wed Nov 06 16:26:53 2019 -0500
+++ b/mercurial/bundle2.py	Wed Nov 06 17:19:33 2019 -0500
@@ -653,7 +653,9 @@
         """add a stream level parameter"""
         if not name:
             raise error.ProgrammingError(b'empty parameter name')
-        if name[0:1] not in pycompat.bytestr(string.ascii_letters):
+        if name[0:1] not in pycompat.bytestr(
+            string.ascii_letters  # pytype: disable=wrong-arg-types
+        ):
             raise error.ProgrammingError(
                 b'non letter first character: %s' % name
             )
@@ -836,7 +838,9 @@
         """
         if not name:
             raise ValueError(r'empty parameter name')
-        if name[0:1] not in pycompat.bytestr(string.ascii_letters):
+        if name[0:1] not in pycompat.bytestr(
+            string.ascii_letters  # pytype: disable=wrong-arg-types
+        ):
             raise ValueError(r'non letter first character: %s' % name)
         try:
             handler = b2streamparamsmap[name.lower()]