Mercurial > public > mercurial-scm > hg-stable
diff mercurial/dagparser.py @ 46415:70f8c64812db stable
typing: fix directives mangled by black
Differential Revision: https://phab.mercurial-scm.org/D10209
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Sat, 13 Mar 2021 00:41:37 -0500 |
parents | 89a2afe31e82 |
children | 6000f5b25c9b |
line wrap: on
line diff
--- a/mercurial/dagparser.py Sat Mar 13 00:40:46 2021 -0500 +++ b/mercurial/dagparser.py Sat Mar 13 00:41:37 2021 -0500 @@ -168,9 +168,9 @@ if not desc: return - wordchars = pycompat.bytestr( - string.ascii_letters + string.digits - ) # pytype: disable=wrong-arg-types + # pytype: disable=wrong-arg-types + wordchars = pycompat.bytestr(string.ascii_letters + string.digits) + # pytype: enable=wrong-arg-types labels = {} p1 = -1 @@ -179,9 +179,9 @@ def resolve(ref): if not ref: return p1 - elif ref[0] in pycompat.bytestr( - string.digits - ): # pytype: disable=wrong-arg-types + # pytype: disable=wrong-arg-types + elif ref[0] in pycompat.bytestr(string.digits): + # pytype: enable=wrong-arg-types return r - int(ref) else: return labels[ref] @@ -215,9 +215,9 @@ c = nextch() while c != b'\0': - while c in pycompat.bytestr( - string.whitespace - ): # pytype: disable=wrong-arg-types + # pytype: disable=wrong-arg-types + while c in pycompat.bytestr(string.whitespace): + # pytype: enable=wrong-arg-types c = nextch() if c == b'.': yield b'n', (r, [p1]) @@ -225,9 +225,9 @@ r += 1 c = nextch() elif c == b'+': - c, digs = nextrun( - nextch(), pycompat.bytestr(string.digits) - ) # pytype: disable=wrong-arg-types + # pytype: disable=wrong-arg-types + c, digs = nextrun(nextch(), pycompat.bytestr(string.digits)) + # pytype: enable=wrong-arg-types n = int(digs) for i in pycompat.xrange(0, n): yield b'n', (r, [p1])