##// END OF EJS Templates
typing: suppress bogus pytype errors in `mercurial/wireprotoframing.py`...
Matt Harbison -
r53021:0c260e71 default
parent child Browse files
Show More
@@ -477,7 +477,9 def createalternatelocationresponseframe
477 477 ):
478 478 value = getattr(location, a)
479 479 if value is not None:
480 # pytype: disable=unsupported-operands
480 481 data[b'location'][pycompat.bytestr(a)] = value
482 # pytype: enable=unsupported-operands
481 483
482 484 payload = b''.join(cborutil.streamencode(data))
483 485
@@ -507,7 +509,7 def createcommanderrorresponse(stream, r
507 509 }
508 510
509 511 if args:
510 m[b'error'][b'args'] = args
512 m[b'error'][b'args'] = args # pytype: disable=unsupported-operands
511 513
512 514 overall = b''.join(cborutil.streamencode(m))
513 515
@@ -773,7 +775,7 class zlibdecoder:
773 775
774 776 class zstdbaseencoder:
775 777 def __init__(self, level):
776 from . import zstd
778 from . import zstd # pytype: disable=import-error
777 779
778 780 self._zstd = zstd
779 781 cctx = zstd.ZstdCompressor(level=level)
@@ -801,7 +803,7 class zstd8mbencoder(zstdbaseencoder):
801 803
802 804 class zstdbasedecoder:
803 805 def __init__(self, maxwindowsize):
804 from . import zstd
806 from . import zstd # pytype: disable=import-error
805 807
806 808 dctx = zstd.ZstdDecompressor(max_window_size=maxwindowsize)
807 809 self._decompressor = dctx.decompressobj()
@@ -831,7 +833,7 def populatestreamencoders():
831 833 return
832 834
833 835 try:
834 from . import zstd
836 from . import zstd # pytype: disable=import-error
835 837
836 838 zstd.__version__
837 839 except ImportError:
General Comments 0
You need to be logged in to leave comments. Login now