8000 rename StripeStreamResponseAsync.read() (#1474) · stripe/stripe-python@e5e1019 · GitHub
[go: up one dir, main page]

Skip to content

Commit e5e1019

Browse files
rename StripeStreamResponseAsync.read() (#1474)
1 parent 08916a1 commit e5e1019

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

stripe/_stripe_response.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,5 @@ def __init__(
6161
def stream(self) -> AsyncIterable[bytes]:
6262
return self._stream
6363

64-
# TODO (MAJOR): rename this to `read_async`
65-
async def read(self) -> bytes: # noqa: ASY100
64+
async def read_async(self) -> bytes:
6665
return b"".join([chunk async for chunk in self._stream])

tests/test_integration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ def do_request(self, n):
496496
stripe.upload_api_base = "http://localhost:%s" % self.mock_server_port
497497

498498
result = await stripe.Quote.pdf_async("qt_123")
499-
assert str(await result.read(), "utf-8") == "hello"
499+
assert str(await result.read_async(), "utf-8") == "hello"
500500

501501
async def test_async_httpx_stream_error(
502502
self, set_global_async_http_client

0 commit comments

Comments
 (0)
0