Skip to content

Commit f5fc9b0

Browse files
committed
Fix warnings
Signed-off-by: Mattt Zmuda <[email protected]>
1 parent 1abbde7 commit f5fc9b0

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

replicate/helpers.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ class FileOutput(httpx.SyncByteStream, httpx.AsyncByteStream):
117117
url: str
118118
client: "Client"
119119

120-
def __init__(self, url: str, client: "Client"):
120+
def __init__(self, url: str, client: "Client") -> None:
121121
self.url = url
122122
self.client = client
123123

@@ -129,8 +129,7 @@ def read(self) -> bytes:
129129
def __iter__(self) -> Iterator[bytes]:
130130
with self.client._client.stream("GET", self.url) as response:
131131
response.raise_for_status()
132-
for chunk in response.iter_bytes():
133-
yield chunk
132+
yield from response.iter_bytes()
134133

135134
async def aread(self) -> bytes:
136135
async with self.client._async_client.stream("GET", self.url) as response:

0 commit comments

Comments
 (0)