mirror of
https://github.com/pyapp-kit/superqt.git
synced 2025-12-13 09:50:05 +01:00
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:
committed by
GitHub
parent
a801e80a31
commit
b11b511c4b
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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("_", " ")
|
||||
|
||||
Reference in New Issue
Block a user