Patchwork D7277: dagparser: suppress some pytype errors around pycompat.bytestring

login
register
mail settings
Submitter phabricator
Date Nov. 8, 2019, 4:48 p.m.
Message ID <e1577408685cc2ae54bb2bff2f842780@localhost.localdomain>
Download mbox | patch
Permalink /patch/42968/
State Not Applicable
Headers show

Comments

phabricator - Nov. 8, 2019, 4:48 p.m.
Closed by commit rHG6d001f452bcb: dagparser: suppress some pytype errors around pycompat.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/D7277?vs=17647&id=17787

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

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

AFFECTED FILES
  mercurial/dagparser.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/dagparser.py b/mercurial/dagparser.py
--- a/mercurial/dagparser.py
+++ b/mercurial/dagparser.py
@@ -168,7 +168,9 @@ 
     if not desc:
         return
 
-    wordchars = pycompat.bytestr(string.ascii_letters + string.digits)
+    wordchars = pycompat.bytestr(
+        string.ascii_letters + string.digits
+    )  # pytype: disable=wrong-arg-types
 
     labels = {}
     p1 = -1
@@ -177,7 +179,9 @@ 
     def resolve(ref):
         if not ref:
             return p1
-        elif ref[0] in pycompat.bytestr(string.digits):
+        elif ref[0] in pycompat.bytestr(
+            string.digits
+        ):  # pytype: disable=wrong-arg-types
             return r - int(ref)
         else:
             return labels[ref]
@@ -211,7 +215,9 @@ 
 
     c = nextch()
     while c != b'\0':
-        while c in pycompat.bytestr(string.whitespace):
+        while c in pycompat.bytestr(
+            string.whitespace
+        ):  # pytype: disable=wrong-arg-types
             c = nextch()
         if c == b'.':
             yield b'n', (r, [p1])
@@ -219,7 +225,9 @@ 
             r += 1
             c = nextch()
         elif c == b'+':
-            c, digs = nextrun(nextch(), pycompat.bytestr(string.digits))
+            c, digs = nextrun(
+                nextch(), pycompat.bytestr(string.digits)
+            )  # pytype: disable=wrong-arg-types
             n = int(digs)
             for i in pycompat.xrange(0, n):
                 yield b'n', (r, [p1])