ci: [pre-commit.ci] autoupdate (#306)

* 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>
This commit is contained in:
pre-commit-ci[bot]
2025-10-13 10:10:51 -04:00
committed by GitHub
parent a801e80a31
commit b11b511c4b
3 changed files with 4 additions and 4 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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("_", " ")