Skip to content

Commit 505fd3b

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 8bbea12 commit 505fd3b

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
@@ -253,8 +253,7 @@ def output_iterator(self) -> Iterator[Any]:
253253

254254
output = self.output or []
255255
new_output = output[len(previous_output) :]
256-
for output in new_output:
257-
yield output
256+
yield from new_output
258257

259258
async def async_output_iterator(self) -> AsyncIterator[Any]:
260259
"""

0 commit comments

Comments
 (0)