Patchwork D7297: cleanup: remove now-obsolete wrong-arg-type annotations

login
register
mail settings
Submitter phabricator
Date Nov. 19, 2019, 4:15 p.m.
Message ID <530ed1ebcefc3356e27595a01f5f5a41@localhost.localdomain>
Download mbox | patch
Permalink /patch/43364/
State Not Applicable
Headers show

Comments

phabricator - Nov. 19, 2019, 4:15 p.m.
durin42 updated this revision to Diff 18241.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7297?vs=18079&id=18241

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




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

Patch

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
@@ -287,13 +287,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