Skip to content

Commit

Permalink
Fixing pyline errors. Change yield to yield from
Browse files Browse the repository at this point in the history
  • Loading branch information
Nate Bynum committed May 30, 2024
1 parent 49bf934 commit d01652f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions elastic_datashader/elastic.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ def scan(search, use_scroll=False, size=10000):
search = search.sort("_doc")
if use_scroll:
for hit in search.scan():
yield hit
yield from hit
else:
_search = search.params(size=size).extra(track_total_hits=False)
while _search is not None:
hit = None
for hit in _search:
yield hit
yield from hit
if hit is not None:
_search = search.extra(search_after=list(hit.meta.sort))
else:
Expand Down Expand Up @@ -597,7 +597,7 @@ def run_search(**kwargs):

while response.aggregations.comp.buckets:
for b in response.aggregations.comp.buckets:
yield b
yield from b
if "after_key" in response.aggregations.comp:
after = response.aggregations.comp.after_key
else:
Expand Down

0 comments on commit d01652f

Please sign in to comment.