From d01652f36b692b913e304ab99274fda8d36c1f9a Mon Sep 17 00:00:00 2001 From: Nate Bynum Date: Thu, 30 May 2024 15:16:41 -0400 Subject: [PATCH 1/2] Fixing pyline errors. Change yield to yield from --- elastic_datashader/elastic.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/elastic_datashader/elastic.py b/elastic_datashader/elastic.py index 241c167..eb91ecb 100644 --- a/elastic_datashader/elastic.py +++ b/elastic_datashader/elastic.py @@ -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: @@ -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: From 52b11a5fa78fee51110a4db7f201f8cea7106045 Mon Sep 17 00:00:00 2001 From: Nate Bynum Date: Thu, 30 May 2024 15:47:12 -0400 Subject: [PATCH 2/2] Fixing pylint for possibly-used-before-assignment --- elastic_datashader/tilegen.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/elastic_datashader/tilegen.py b/elastic_datashader/tilegen.py index d29ebd7..edfa3d9 100644 --- a/elastic_datashader/tilegen.py +++ b/elastic_datashader/tilegen.py @@ -778,6 +778,8 @@ def generate_nonaggregated_tile( # now for the points as well points_agg = None + points_color_key = None + if df_points is not None: df_points["c"] = df_points["c"].astype("category") # prevent memory explosion in datashader _colorize