From 01267d904e97cad0265df5de79df92311f5fcdb6 Mon Sep 17 00:00:00 2001 From: Simon Brugman Date: Thu, 6 Jul 2023 15:24:34 +0200 Subject: [PATCH] chore: update pre-commit --- .pre-commit-config.yaml | 4 ++-- popmon/visualization/histogram_section.py | 5 +---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 289f81c7..b58ce4bf 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,7 +4,7 @@ repos: hooks: - id: black - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: 'v0.0.272' + rev: 'v0.0.277' hooks: - id: ruff args: [--fix] @@ -24,5 +24,5 @@ repos: hooks: - id: nbqa-black - id: nbqa-ruff - additional_dependencies: [ruff==v0.0.270] + additional_dependencies: [ruff==v0.0.277] diff --git a/popmon/visualization/histogram_section.py b/popmon/visualization/histogram_section.py index 87c128c7..d590a2e0 100644 --- a/popmon/visualization/histogram_section.py +++ b/popmon/visualization/histogram_section.py @@ -187,10 +187,7 @@ def transform(self, data_obj: dict, sections: list | None = None): histogram = [] # filter out potential empty heatmap plots, then prepend them to the sorted histograms - hplots = [] - for h in heatmaps: - if isinstance(h, dict) and len(h["plot"]): - hplots.append(h) + hplots = [h for h in heatmaps if isinstance(h, dict) and len(h["plot"])] if len(hplots) > 0: plot_type_layouts["heatmap"] = hplots[0]["layout"]