mercurial/wireprotoframing.py
changeset 52124 0c260e7158e0
parent 51859 f4733654f144
child 52643 5cc8deb96b48
--- a/mercurial/wireprotoframing.py	Thu Oct 24 22:47:31 2024 -0400
+++ b/mercurial/wireprotoframing.py	Fri Oct 25 23:07:34 2024 -0400
@@ -477,7 +477,9 @@
     ):
         value = getattr(location, a)
         if value is not None:
+            # pytype: disable=unsupported-operands
             data[b'location'][pycompat.bytestr(a)] = value
+            # pytype: enable=unsupported-operands
 
     payload = b''.join(cborutil.streamencode(data))
 
@@ -507,7 +509,7 @@
     }
 
     if args:
-        m[b'error'][b'args'] = args
+        m[b'error'][b'args'] = args  # pytype: disable=unsupported-operands
 
     overall = b''.join(cborutil.streamencode(m))
 
@@ -773,7 +775,7 @@
 
 class zstdbaseencoder:
     def __init__(self, level):
-        from . import zstd
+        from . import zstd  # pytype: disable=import-error
 
         self._zstd = zstd
         cctx = zstd.ZstdCompressor(level=level)
@@ -801,7 +803,7 @@
 
 class zstdbasedecoder:
     def __init__(self, maxwindowsize):
-        from . import zstd
+        from . import zstd  # pytype: disable=import-error
 
         dctx = zstd.ZstdDecompressor(max_window_size=maxwindowsize)
         self._decompressor = dctx.decompressobj()
@@ -831,7 +833,7 @@
         return
 
     try:
-        from . import zstd
+        from . import zstd  # pytype: disable=import-error
 
         zstd.__version__
     except ImportError: