dagparser: suppress some pytype errors around pycompat.bytestring
I can't justify why we're getting these errors, but nothing I do fixes
these handful of calls, so let's just move on with suppressions.
Differential Revision: https://phab.mercurial-scm.org/D7277
--- a/mercurial/dagparser.py Wed Nov 06 14:48:34 2019 -0500
+++ b/mercurial/dagparser.py Wed Nov 06 15:12:13 2019 -0500
@@ -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])