From b11b511c4bdc6a1b6c0fe19ec594d3a3dce00966 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 13 Oct 2025 10:10:51 -0400 Subject: [PATCH] ci: [pre-commit.ci] autoupdate (#306) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ci: [pre-commit.ci] autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.12.7 → v0.13.3](https://github.com/astral-sh/ruff-pre-commit/compare/v0.12.7...v0.13.3) - [github.com/pre-commit/mirrors-mypy: v1.17.1 → v1.18.2](https://github.com/pre-commit/mirrors-mypy/compare/v1.17.1...v1.18.2) * style: [pre-commit.ci] auto fixes [...] --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 4 ++-- src/superqt/cmap/_cmap_utils.py | 2 +- src/superqt/combobox/_enum_combobox.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 48160ca..1b5610c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,7 +5,7 @@ ci: repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.12.7 + rev: v0.13.3 hooks: - id: ruff args: [--fix, --unsafe-fixes] @@ -17,7 +17,7 @@ repos: - id: validate-pyproject - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.17.1 + rev: v1.18.2 hooks: - id: mypy exclude: tests|examples diff --git a/src/superqt/cmap/_cmap_utils.py b/src/superqt/cmap/_cmap_utils.py index 219b4a9..b1bf6a3 100644 --- a/src/superqt/cmap/_cmap_utils.py +++ b/src/superqt/cmap/_cmap_utils.py @@ -164,5 +164,5 @@ def pick_font_color(cmap: Colormap, at_stop: float = 0.49, alpha: int = 255) -> def _is_dark(cmap: Colormap, at_stop: float, threshold: float = 110) -> bool: """Return True if the color at `at_stop` is dark according to `threshold`.""" color = cmap(at_stop) - r, g, b, a = color.rgba8 + r, g, b, _a = color.rgba8 return (r * 0.299 + g * 0.587 + b * 0.114) > threshold diff --git a/src/superqt/combobox/_enum_combobox.py b/src/superqt/combobox/_enum_combobox.py index 9abf0e2..2ad15dc 100644 --- a/src/superqt/combobox/_enum_combobox.py +++ b/src/superqt/combobox/_enum_combobox.py @@ -40,7 +40,7 @@ def _get_name(enum_value: Enum): from enum import _decompose - members, not_covered = _decompose(enum_value.__class__, enum_value.value) + members, _not_covered = _decompose(enum_value.__class__, enum_value.value) name = "|".join(m.name.replace("_", " ") for m in members[::-1]) else: name = enum_value.name.replace("_", " ")