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.
--- 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)