Skip to content

Commit 525c585

Browse files
committed
helpers.async_bulk to return explicit tuple.
in Python3.11, when <stats_only> is False, it returns a tuple of (<success>, <errors>) insted of only list of <errors>. The fix makes sure that it returns a tuple when <stats_only> is True and list otherwise.
1 parent 03e2b6d commit 525c585

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

elasticsearch/_async/helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ async def async_bulk(
345345
else:
346346
success += 1
347347

348-
return success, failed if stats_only else errors
348+
return (success, failed) if stats_only else errors
349349

350350

351351
async def async_scan(

0 commit comments

Comments
 (0)