From 77642b9e3d780f0eeed71f7e9cda35d00f41b389 Mon Sep 17 00:00:00 2001 From: Sid <27780930+autinerd@users.noreply.github.com> Date: Thu, 26 Sep 2024 19:13:08 +0200 Subject: [PATCH] Bump ruff to 0.6.8 (#126842) --- .pre-commit-config.yaml | 2 +- homeassistant/components/esphome/lock.py | 2 +- homeassistant/components/lifx/manager.py | 6 +++--- homeassistant/components/motion_blinds/cover.py | 2 +- pyproject.toml | 2 +- requirements_test_pre_commit.txt | 2 +- script/hassfest/docker/Dockerfile | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 303106087f2..e21271d7266 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.6.6 + rev: v0.6.8 hooks: - id: ruff args: diff --git a/homeassistant/components/esphome/lock.py b/homeassistant/components/esphome/lock.py index 15a402ccb91..502cd361277 100644 --- a/homeassistant/components/esphome/lock.py +++ b/homeassistant/components/esphome/lock.py @@ -68,7 +68,7 @@ class EsphomeLock(EsphomeEntity[LockInfo, LockEntityState], LockEntity): @convert_api_error_ha_error async def async_unlock(self, **kwargs: Any) -> None: """Unlock the lock.""" - code = kwargs.get(ATTR_CODE, None) + code = kwargs.get(ATTR_CODE) self._client.lock_command(self._key, LockCommand.UNLOCK, code) @convert_api_error_ha_error diff --git a/homeassistant/components/lifx/manager.py b/homeassistant/components/lifx/manager.py index c23837c5fcc..759d08707cd 100644 --- a/homeassistant/components/lifx/manager.py +++ b/homeassistant/components/lifx/manager.py @@ -332,7 +332,7 @@ class LIFXManager: elif service == SERVICE_EFFECT_MORPH: theme_name = kwargs.get(ATTR_THEME, "exciting") - palette = kwargs.get(ATTR_PALETTE, None) + palette = kwargs.get(ATTR_PALETTE) if palette is not None: theme = Theme() @@ -362,7 +362,7 @@ class LIFXManager: direction=kwargs.get( ATTR_DIRECTION, EFFECT_MOVE_DEFAULT_DIRECTION ), - theme_name=kwargs.get(ATTR_THEME, None), + theme_name=kwargs.get(ATTR_THEME), power_on=kwargs.get(ATTR_POWER_ON, False), ) for coordinator in coordinators @@ -410,7 +410,7 @@ class LIFXManager: await self.effects_conductor.start(effect, bulbs) elif service == SERVICE_EFFECT_SKY: - palette = kwargs.get(ATTR_PALETTE, None) + palette = kwargs.get(ATTR_PALETTE) if palette is not None: theme = Theme() for hsbk in palette: diff --git a/homeassistant/components/motion_blinds/cover.py b/homeassistant/components/motion_blinds/cover.py index e60e7fa0ae8..1ea3a6ed9d6 100644 --- a/homeassistant/components/motion_blinds/cover.py +++ b/homeassistant/components/motion_blinds/cover.py @@ -461,7 +461,7 @@ class MotionTDBUDevice(MotionBaseDevice): async def async_set_absolute_position(self, **kwargs): """Move the cover to a specific absolute position.""" position = kwargs[ATTR_ABSOLUTE_POSITION] - target_width = kwargs.get(ATTR_WIDTH, None) + target_width = kwargs.get(ATTR_WIDTH) async with self._api_lock: await self.hass.async_add_executor_job( diff --git a/pyproject.toml b/pyproject.toml index d7dff4e5d16..68a3751b42b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -692,7 +692,7 @@ exclude_lines = [ ] [tool.ruff] -required-version = ">=0.5.3" +required-version = ">=0.6.8" [tool.ruff.lint] select = [ diff --git a/requirements_test_pre_commit.txt b/requirements_test_pre_commit.txt index a506cb37c88..184dba9c6df 100644 --- a/requirements_test_pre_commit.txt +++ b/requirements_test_pre_commit.txt @@ -1,5 +1,5 @@ # Automatically generated from .pre-commit-config.yaml by gen_requirements_all.py, do not edit codespell==2.3.0 -ruff==0.6.6 +ruff==0.6.8 yamllint==1.35.1 diff --git a/script/hassfest/docker/Dockerfile b/script/hassfest/docker/Dockerfile index 970e987cc1d..130e9ae4be1 100644 --- a/script/hassfest/docker/Dockerfile +++ b/script/hassfest/docker/Dockerfile @@ -22,7 +22,7 @@ RUN --mount=from=ghcr.io/astral-sh/uv:0.4.15,source=/uv,target=/bin/uv \ --no-cache \ -c /usr/src/homeassistant/homeassistant/package_constraints.txt \ -r /usr/src/homeassistant/requirements.txt \ - stdlib-list==0.10.0 pipdeptree==2.23.4 tqdm==4.66.5 ruff==0.6.6 \ + stdlib-list==0.10.0 pipdeptree==2.23.4 tqdm==4.66.5 ruff==0.6.8 \ PyTurboJPEG==1.7.5 ha-ffmpeg==3.2.0 hassil==1.7.4 home-assistant-intents==2024.9.23 mutagen==1.47.0 pymicro-vad==1.0.1 pyspeex-noise==1.0.2 LABEL "name"="hassfest"