]> git.ipfire.org Git - thirdparty/httpx.git/commitdiff
fix typo (#3519)
authorKar Petrosyan <92274156+karpetrosyan@users.noreply.github.com>
Thu, 27 Feb 2025 16:38:39 +0000 (20:38 +0400)
committerGitHub <noreply@github.com>
Thu, 27 Feb 2025 16:38:39 +0000 (20:38 +0400)
httpx/_client.py
httpx/_models.py

index 2249231f8c3b912c731ff160344d3672e2f11738..13cd9336732a0854dae25b53b34e4b2e749b5897 100644 (file)
@@ -1723,7 +1723,7 @@ class AsyncClient(BaseClient):
 
         if not isinstance(request.stream, AsyncByteStream):
             raise RuntimeError(
-                "Attempted to send an sync request with an AsyncClient instance."
+                "Attempted to send a sync request with an AsyncClient instance."
             )
 
         with request_context(request=request):
index 67d74bf86bfc80e22d9a4a3153572845accd9039..2cc86321a4bc0915bd5e3886b3a69d551bbfc8d0 100644 (file)
@@ -964,7 +964,7 @@ class Response:
         Automatically called if the response body is read to completion.
         """
         if not isinstance(self.stream, SyncByteStream):
-            raise RuntimeError("Attempted to call an sync close on an async stream.")
+            raise RuntimeError("Attempted to call a sync close on an async stream.")
 
         if not self.is_closed:
             self.is_closed = True
@@ -1045,7 +1045,7 @@ class Response:
         if self.is_closed:
             raise StreamClosed()
         if not isinstance(self.stream, AsyncByteStream):
-            raise RuntimeError("Attempted to call an async iterator on an sync stream.")
+            raise RuntimeError("Attempted to call an async iterator on a sync stream.")
 
         self.is_stream_consumed = True
         self._num_bytes_downloaded = 0
@@ -1068,7 +1068,7 @@ class Response:
         Automatically called if the response body is read to completion.
         """
         if not isinstance(self.stream, AsyncByteStream):
-            raise RuntimeError("Attempted to call an async close on an sync stream.")
+            raise RuntimeError("Attempted to call an async close on a sync stream.")
 
         if not self.is_closed:
             self.is_closed = True