typing: suppress a false error in mercurial/revlogutils/docket.py on py2
authorMatt Harbison <matt_harbison@yahoo.com>
Sat, 12 Jun 2021 14:50:33 -0400
changeset 47429 be903d043099
parent 47428 88439c6fbafc
child 47430 f77404040776
typing: suppress a false error in mercurial/revlogutils/docket.py on py2 `ord()` wants bytes or str on py3, so I'm guessing it got confused by passing a single byte instead of a one byte string. But this seems to work on 2.7.18 anyway. Differential Revision: https://phab.mercurial-scm.org/D10876
mercurial/revlogutils/docket.py
--- a/mercurial/revlogutils/docket.py	Wed Jun 09 00:59:44 2021 +0200
+++ b/mercurial/revlogutils/docket.py	Sat Jun 12 14:50:33 2021 -0400
@@ -60,7 +60,9 @@
         if pycompat.ispy3:
             iter_seed = iter(seed)
         else:
+            # pytype: disable=wrong-arg-types
             iter_seed = (ord(c) for c in seed)
+            # pytype: enable=wrong-arg-types
         # some basic circular sum hashing on 64 bits
         int_seed = 0
         low_mask = int('1' * 35, 2)