Skip to content

Commit 4189b7f

Browse files
authored
fix typo (#3519)
1 parent e70d0b0 commit 4189b7f

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

httpx/_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1723,7 +1723,7 @@ async def _send_single_request(self, request: Request) -> Response:
17231723

17241724
if not isinstance(request.stream, AsyncByteStream):
17251725
raise RuntimeError(
1726-
"Attempted to send an sync request with an AsyncClient instance."
1726+
"Attempted to send a sync request with an AsyncClient instance."
17271727
)
17281728

17291729
with request_context(request=request):

httpx/_models.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -964,7 +964,7 @@ def close(self) -> None:
964964
Automatically called if the response body is read to completion.
965965
"""
966966
if not isinstance(self.stream, SyncByteStream):
967-
raise RuntimeError("Attempted to call an sync close on an async stream.")
967+
raise RuntimeError("Attempted to call a sync close on an async stream.")
968968

969969
if not self.is_closed:
970970
self.is_closed = True
@@ -1045,7 +1045,7 @@ async def aiter_raw(
10451045
if self.is_closed:
10461046
raise StreamClosed()
10471047
if not isinstance(self.stream, AsyncByteStream):
1048-
raise RuntimeError("Attempted to call an async iterator on an sync stream.")
1048+
raise RuntimeError("Attempted to call an async iterator on a sync stream.")
10491049

10501050
self.is_stream_consumed = True
10511051
self._num_bytes_downloaded = 0
@@ -1068,7 +1068,7 @@ async def aclose(self) -> None:
10681068
Automatically called if the response body is read to completion.
10691069
"""
10701070
if not isinstance(self.stream, AsyncByteStream):
1071-
raise RuntimeError("Attempted to call an async close on an sync stream.")
1071+
raise RuntimeError("Attempted to call an async close on a sync stream.")
10721072

10731073
if not self.is_closed:
10741074
self.is_closed = True

0 commit comments

Comments
 (0)