Patchwork D7291: bundle2: more pytype suppressions around bytestring

login
register
mail settings
Submitter phabricator
Date Nov. 7, 2019, 8:36 a.m.
Message ID <11951339737790f55241ce48dded5d6f@localhost.localdomain>
Download mbox | patch
Permalink /patch/42887/
State Not Applicable
Headers show

Comments

phabricator - Nov. 7, 2019, 8:36 a.m.
Closed by commit rHGea25b4673231: bundle2: more pytype suppressions around bytestring (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/D7291?vs=17661&id=17704

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

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

AFFECTED FILES
  mercurial/bundle2.py

CHANGE DETAILS




To: durin42, #hg-reviewers, indygreg
Cc: mercurial-devel

Patch

diff --git a/mercurial/bundle2.py b/mercurial/bundle2.py
--- a/mercurial/bundle2.py
+++ b/mercurial/bundle2.py
@@ -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()]