changeset 51879: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 6a0afc73472e
children 8f3cbea2547c
files mercurial/keepalive.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
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)