D7291: bundle2: more pytype suppressions around bytestring
durin42 (Augie Fackler)
phabricator at mercurial-scm.org
Wed Nov 6 23:01:23 UTC 2019
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
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()]
To: durin42, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list