From 6981ae61af765c3145d5249ca7c44a1b03bda778 Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Wed, 18 Sep 2024 14:14:17 -0500 Subject: [PATCH] Update to flake8 7.1.1. (#627) We need to update flake8 to fix a false-positive that appears with older flake8 versions on Python 3.12. Authors: - Bradley Dice (https://github.com/bdice) - Ajay Thorve (https://github.com/AjayThorve) Approvers: - James Lamb (https://github.com/jameslamb) - Ajay Thorve (https://github.com/AjayThorve) URL: https://github.com/rapidsai/cuxfilter/pull/627 --- .pre-commit-config.yaml | 2 +- conda/environments/all_cuda-118_arch-x86_64.yaml | 1 + conda/environments/all_cuda-125_arch-x86_64.yaml | 1 + dependencies.yaml | 2 ++ .../cuxfilter/charts/core/non_aggregate/core_non_aggregate.py | 4 ++-- .../cuxfilter/charts/core/non_aggregate/core_stacked_line.py | 1 - python/cuxfilter/dashboard.py | 2 +- 7 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3ad014d8..1d8a944f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ repos: # Explicitly specify the pyproject.toml at the repo root, not per-project. args: ["--config", "pyproject.toml"] - repo: https://github.com/PyCQA/flake8 - rev: 6.0.0 + rev: 7.1.1 hooks: - id: flake8 args: ["--config=.flake8"] diff --git a/conda/environments/all_cuda-118_arch-x86_64.yaml b/conda/environments/all_cuda-118_arch-x86_64.yaml index fff00af3..d98fa3d0 100644 --- a/conda/environments/all_cuda-118_arch-x86_64.yaml +++ b/conda/environments/all_cuda-118_arch-x86_64.yaml @@ -7,6 +7,7 @@ channels: - nvidia dependencies: - bokeh>=3.1 +- bokeh_sampledata - cuda-version=11.8 - cudatoolkit - cudf==24.10.*,>=0.0.0a0 diff --git a/conda/environments/all_cuda-125_arch-x86_64.yaml b/conda/environments/all_cuda-125_arch-x86_64.yaml index 77ba80f5..e9247f99 100644 --- a/conda/environments/all_cuda-125_arch-x86_64.yaml +++ b/conda/environments/all_cuda-125_arch-x86_64.yaml @@ -7,6 +7,7 @@ channels: - nvidia dependencies: - bokeh>=3.1 +- bokeh_sampledata - cuda-version=12.5 - cudf==24.10.*,>=0.0.0a0 - cugraph==24.10.*,>=0.0.0a0 diff --git a/dependencies.yaml b/dependencies.yaml index 899d8b6f..fcc33029 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -137,6 +137,7 @@ dependencies: common: - output_types: [conda, requirements] packages: + - bokeh_sampledata - ipykernel - ipython - jupyter_sphinx @@ -153,6 +154,7 @@ dependencies: common: - output_types: [conda, requirements] packages: + - bokeh_sampledata - ipython - notebook>=0.5.0 - output_types: [conda] diff --git a/python/cuxfilter/charts/core/non_aggregate/core_non_aggregate.py b/python/cuxfilter/charts/core/non_aggregate/core_non_aggregate.py index 48bb8b1c..73f2e6c9 100644 --- a/python/cuxfilter/charts/core/non_aggregate/core_non_aggregate.py +++ b/python/cuxfilter/charts/core/non_aggregate/core_non_aggregate.py @@ -31,8 +31,8 @@ def name(self): chart_type = self.chart_type if self.chart_type else "chart" return ( f"{self.x}_{self.y}" - f"{'_'+self.aggregate_col if self.aggregate_col else ''}" - f"{'_'+self.aggregate_fn if self.aggregate_fn else ''}" + f"{'_' + self.aggregate_col if self.aggregate_col else ''}" + f"{'_' + self.aggregate_fn if self.aggregate_fn else ''}" f"_{chart_type}_{self.title}" ) diff --git a/python/cuxfilter/charts/core/non_aggregate/core_stacked_line.py b/python/cuxfilter/charts/core/non_aggregate/core_stacked_line.py index b4982781..62ade6f7 100644 --- a/python/cuxfilter/charts/core/non_aggregate/core_stacked_line.py +++ b/python/cuxfilter/charts/core/non_aggregate/core_stacked_line.py @@ -21,7 +21,6 @@ class BaseStackedLine(BaseChart): y_range: Tuple = None use_data_tiles = False y: list = [] - colors: list = [] default_colors = ["#8735fb"] box_selected_range = None diff --git a/python/cuxfilter/dashboard.py b/python/cuxfilter/dashboard.py index de52c223..3fb3bd54 100644 --- a/python/cuxfilter/dashboard.py +++ b/python/cuxfilter/dashboard.py @@ -308,7 +308,7 @@ def _generate_query_str(self, query_dict=None, ignore_chart=""): # extract string queries from query_dict, # as self.query_dict also contains cudf.Series indices - str_queries_list = [x for x in query_dict.values() if type(x) == str] + str_queries_list = [x for x in query_dict.values() if type(x) is str] return_query_str = " and ".join(str_queries_list) # adding the popped value to the query_str_dict again