D7297: cleanup: remove now-obsolete wrong-arg-type annotations
durin42 (Augie Fackler)
phabricator at mercurial-scm.org
Thu Nov 14 03:52:21 UTC 2019
durin42 updated this revision to Diff 18067.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D7297?vs=17673&id=18067
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D7297/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D7297
AFFECTED FILES
mercurial/branchmap.py
mercurial/bundle2.py
mercurial/dagparser.py
CHANGE DETAILS
diff --git a/mercurial/dagparser.py b/mercurial/dagparser.py
--- a/mercurial/dagparser.py
+++ b/mercurial/dagparser.py
@@ -168,9 +168,7 @@
if not desc:
return
- wordchars = pycompat.bytestr(
- string.ascii_letters + string.digits
- ) # pytype: disable=wrong-arg-types
+ wordchars = pycompat.bytestr(string.ascii_letters + string.digits)
labels = {}
p1 = -1
@@ -179,9 +177,7 @@
def resolve(ref):
if not ref:
return p1
- elif ref[0] in pycompat.bytestr(
- string.digits
- ): # pytype: disable=wrong-arg-types
+ elif ref[0] in pycompat.bytestr(string.digits):
return r - int(ref)
else:
return labels[ref]
@@ -215,9 +211,7 @@
c = nextch()
while c != b'\0':
- while c in pycompat.bytestr(
- string.whitespace
- ): # pytype: disable=wrong-arg-types
+ while c in pycompat.bytestr(string.whitespace):
c = nextch()
if c == b'.':
yield b'n', (r, [p1])
@@ -225,9 +219,7 @@
r += 1
c = nextch()
elif c == b'+':
- c, digs = nextrun(
- nextch(), pycompat.bytestr(string.digits)
- ) # pytype: disable=wrong-arg-types
+ c, digs = nextrun(nextch(), pycompat.bytestr(string.digits))
n = int(digs)
for i in pycompat.xrange(0, n):
yield b'n', (r, [p1])
diff --git a/mercurial/bundle2.py b/mercurial/bundle2.py
--- a/mercurial/bundle2.py
+++ b/mercurial/bundle2.py
@@ -653,9 +653,7 @@
"""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 # pytype: disable=wrong-arg-types
- ):
+ if name[0:1] not in pycompat.bytestr(string.ascii_letters):
raise error.ProgrammingError(
b'non letter first character: %s' % name
)
@@ -838,9 +836,7 @@
"""
if not name:
raise ValueError('empty parameter name')
- if name[0:1] not in pycompat.bytestr(
- string.ascii_letters # pytype: disable=wrong-arg-types
- ):
+ if name[0:1] not in pycompat.bytestr(string.ascii_letters):
raise ValueError('non letter first character: %s' % name)
try:
handler = b2streamparamsmap[name.lower()]
diff --git a/mercurial/branchmap.py b/mercurial/branchmap.py
--- a/mercurial/branchmap.py
+++ b/mercurial/branchmap.py
@@ -269,13 +269,7 @@
if repo.ui.debugflag:
msg = b'invalid %s: %s\n'
repo.ui.debug(
- msg
- % (
- _branchcachedesc(repo),
- pycompat.bytestr(
- inst # pytype: disable=wrong-arg-types
- ),
- )
+ msg % (_branchcachedesc(repo), pycompat.bytestr(inst))
)
bcache = None
To: durin42, #hg-reviewers, indygreg
Cc: indygreg, mercurial-devel
More information about the Mercurial-devel
mailing list