From 92992ad804c862e437bec1e34296f7094a743564 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 14 Aug 2023 21:17:19 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/psf/black: 23.3.0 → 23.7.0](https://github.com/psf/black/compare/23.3.0...23.7.0) - [github.com/pre-commit/mirrors-prettier: v3.0.0-alpha.9-for-vscode → v3.0.1](https://github.com/pre-commit/mirrors-prettier/compare/v3.0.0-alpha.9-for-vscode...v3.0.1) - [github.com/asottile/blacken-docs: 1.13.0 → 1.15.0](https://github.com/asottile/blacken-docs/compare/1.13.0...1.15.0) - [github.com/pre-commit/mirrors-mypy: v1.3.0 → v1.5.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.3.0...v1.5.0) - https://github.com/charliermarsh/ruff-pre-commit → https://github.com/astral-sh/ruff-pre-commit - [github.com/astral-sh/ruff-pre-commit: v0.0.272 → v0.0.284](https://github.com/astral-sh/ruff-pre-commit/compare/v0.0.272...v0.0.284) --- .pre-commit-config.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4245841f..a2500823 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,25 +9,25 @@ ci: skip: [] repos: - repo: https://github.com/psf/black - rev: 23.3.0 + rev: 23.7.0 hooks: - id: black - repo: https://github.com/pre-commit/mirrors-prettier - rev: v3.0.0-alpha.9-for-vscode + rev: v3.0.1 hooks: - id: prettier - repo: https://github.com/asottile/blacken-docs - rev: 1.13.0 + rev: 1.15.0 hooks: - id: blacken-docs - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.3.0 + rev: v1.5.0 hooks: - id: mypy additional_dependencies: [numpy, types-requests] exclude: tests/|docs/ - - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.0.272 + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.0.284 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] From 948babb195a2e3df1a46b928ed0356989f0989e4 Mon Sep 17 00:00:00 2001 From: Tim Treis Date: Wed, 16 Aug 2023 17:22:01 +0200 Subject: [PATCH 2/2] ruff fix --- src/spatialdata_plot/pl/utils.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/spatialdata_plot/pl/utils.py b/src/spatialdata_plot/pl/utils.py index 66aeb8f0..cf391c1d 100644 --- a/src/spatialdata_plot/pl/utils.py +++ b/src/spatialdata_plot/pl/utils.py @@ -797,8 +797,7 @@ def _map_color_seg( if seg_boundaries: seg_bound: ArrayLike = np.clip(seg_im - find_boundaries(seg)[:, :, None], 0, 1) - seg_bound = np.dstack((seg_bound, np.where(val_im > 0, 1, 0))) # add transparency here - return seg_bound + return np.dstack((seg_bound, np.where(val_im > 0, 1, 0))) # add transparency here return np.dstack((seg_im, np.where(val_im > 0, 1, 0)))