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):