mercurial/utils/procutil.py
changeset 48487 333a2656e981
parent 46889 8759e22f1649
child 48488 f8540fe4be0f
--- a/mercurial/utils/procutil.py	Tue Dec 14 17:06:32 2021 -0500
+++ b/mercurial/utils/procutil.py	Tue Dec 14 17:25:46 2021 -0500
@@ -75,7 +75,9 @@
         return res
 
 
+# pytype: disable=attribute-error
 io.BufferedIOBase.register(LineBufferedWrapper)
+# pytype: enable=attribute-error
 
 
 def make_line_buffered(stream):
@@ -114,7 +116,9 @@
         return total_written
 
 
+# pytype: disable=attribute-error
 io.IOBase.register(WriteAllWrapper)
+# pytype: enable=attribute-error
 
 
 def _make_write_all(stream):
@@ -767,6 +771,7 @@
             raise
         finally:
             if stdin_bytes is not None:
+                assert not isinstance(stdin, int)
                 stdin.close()
         if not ensurestart:
             # Even though we're not waiting on the child process,