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