diff mercurial/keepalive.py @ 51875:1a640aa20e48

keepalive: fix a signature mismatch for a http.client.HTTPResponse subclass Also flagged by PyCharm. This is checked by pytype too, so I'm not sure why it misses this. I verified in py36 that this argument is documented for the function, so maybe this is py2 legacy.
author Matt Harbison <matt_harbison@yahoo.com>
date Sun, 22 Sep 2024 17:15:20 -0400
parents f4733654f144
children 24ee91ba9aa8
line wrap: on
line diff
--- a/mercurial/keepalive.py	Sun Sep 22 17:11:10 2024 -0400
+++ b/mercurial/keepalive.py	Sun Sep 22 17:15:20 2024 -0400
@@ -432,8 +432,8 @@
             self._handler.parent.receivedbytescount += len(data)
         return data
 
-    def readline(self):
-        data = super().readline()
+    def readline(self, limit: int = -1):
+        data = super().readline(limit=limit)
         self.receivedbytescount += len(data)
         if self._connection is not None:
             self._connection.receivedbytescount += len(data)