gh-103112: Add http.client.HTTPResponse.read docstring and fix pydoc output (#103113)

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Éric <merwok@netwok.org>
This commit is contained in:
Bernhard Wagner 2023-03-29 21:21:56 +02:00 committed by GitHub
parent e375bff037
commit d052a383f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -448,6 +448,7 @@ class HTTPResponse(io.BufferedIOBase):
return self.fp is None
def read(self, amt=None):
"""Read and return the response body, or up to the next amt bytes."""
if self.fp is None:
return b""

View File

@ -0,0 +1 @@
Add docstring to :meth:`http.client.HTTPResponse.read` to fix ``pydoc`` output.