From 8035ea3ed104242e4698f96e815035a818791473 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 15 Jun 2025 21:55:36 -0700 Subject: [PATCH] [pre-commit.ci] pre-commit autoupdate (#1163) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.8.4 → v0.11.13](https://github.com/astral-sh/ruff-pre-commit/compare/v0.8.4...v0.11.13) - [github.com/psf/black: 24.10.0 → 25.1.0](https://github.com/psf/black/compare/24.10.0...25.1.0) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix pre-commit --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Bas Nijholt --- .pre-commit-config.yaml | 4 ++-- custom_components/adaptive_lighting/color_and_brightness.py | 4 ++-- webapp/color_and_brightness.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fcaebb75..1321a487 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,11 +8,11 @@ repos: - id: mixed-line-ending args: ["--fix=lf"] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.8.4 + rev: v0.11.13 hooks: - id: ruff args: ["--fix"] - repo: https://github.com/psf/black - rev: 24.10.0 + rev: 25.1.0 hooks: - id: black diff --git a/custom_components/adaptive_lighting/color_and_brightness.py b/custom_components/adaptive_lighting/color_and_brightness.py index 215a9a70..6fdb7083 100644 --- a/custom_components/adaptive_lighting/color_and_brightness.py +++ b/custom_components/adaptive_lighting/color_and_brightness.py @@ -502,9 +502,9 @@ def lerp_color_hsv( ) # Convert back to RGB - rgb = tuple(int(round(x * 255)) for x in colorsys.hsv_to_rgb(*hsv)) + rgb = tuple(round(x * 255) for x in colorsys.hsv_to_rgb(*hsv)) assert all(0 <= x <= 255 for x in rgb), f"Invalid RGB color: {rgb}" - return cast(tuple[int, int, int], rgb) + return cast("tuple[int, int, int]", rgb) def lerp(x, x1, x2, y1, y2): diff --git a/webapp/color_and_brightness.py b/webapp/color_and_brightness.py index b632ba8e..849c2373 100644 --- a/webapp/color_and_brightness.py +++ b/webapp/color_and_brightness.py @@ -502,9 +502,9 @@ def lerp_color_hsv( ) # Convert back to RGB - rgb = tuple(int(round(x * 255)) for x in colorsys.hsv_to_rgb(*hsv)) + rgb = tuple(round(x * 255) for x in colorsys.hsv_to_rgb(*hsv)) assert all(0 <= x <= 255 for x in rgb), f"Invalid RGB color: {rgb}" - return cast(tuple[int, int, int], rgb) + return cast("tuple[int, int, int]", rgb) def lerp(x, x1, x2, y1, y2):