keepalive: fix a signature mismatch for a http.client.HTTPResponse subclass
authorMatt Harbison <matt_harbison@yahoo.com>
Sun, 22 Sep 2024 17:15:20 -0400
changeset 51879 1a640aa20e48
parent 51878 6a0afc73472e
child 51880 8f3cbea2547c
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.
mercurial/keepalive.py
--- 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)