Skip to content

Commit cfe7234

Browse files
committed
Fix R1737: Use 'yield from' directly instead of yielding each element one by one (use-yield-from)
Signed-off-by: Mattt Zmuda <[email protected]>
1 parent 54c8531 commit cfe7234

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

replicate/prediction.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,7 @@ def output_iterator(self) -> Iterator[Any]:
249249

250250
output = self.output or []
251251
new_output = output[len(previous_output) :]
252-
for output in new_output:
253-
yield output
252+
yield from new_output
254253

255254
async def async_output_iterator(self) -> AsyncIterator[Any]:
256255
"""

0 commit comments

Comments
 (0)