From patchwork Wed Nov 6 23:01:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D7291: bundle2: more pytype suppressions around bytestring From: phabricator X-Patchwork-Id: 42845 Message-Id: To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Wed, 6 Nov 2019 23:01:23 +0000 durin42 created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY We clearly need to work around this somehow. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D7291 AFFECTED FILES mercurial/bundle2.py CHANGE DETAILS To: durin42, #hg-reviewers Cc: mercurial-devel diff --git a/mercurial/bundle2.py b/mercurial/bundle2.py --- a/mercurial/bundle2.py +++ b/mercurial/bundle2.py @@ -653,7 +653,9 @@ """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): + if name[0:1] not in pycompat.bytestr( + string.ascii_letters # pytype: disable=wrong-arg-types + ): raise error.ProgrammingError( b'non letter first character: %s' % name ) @@ -836,7 +838,9 @@ """ if not name: raise ValueError(r'empty parameter name') - if name[0:1] not in pycompat.bytestr(string.ascii_letters): + if name[0:1] not in pycompat.bytestr( + string.ascii_letters # pytype: disable=wrong-arg-types + ): raise ValueError(r'non letter first character: %s' % name) try: handler = b2streamparamsmap[name.lower()]