diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 303106087f256c..e21271d7266a9b 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 15a402ccb919fc..502cd361277558 100644 --- a/homeassistant/components/esphome/lock.py +++ b/homeassistant/components/esphome/lock.py @@ -68,7 +68,7 @@ async def async_lock(self, **kwargs: Any) -> None: @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 c23837c5fccc47..759d08707cdb07 100644 --- a/homeassistant/components/lifx/manager.py +++ b/homeassistant/components/lifx/manager.py @@ -332,7 +332,7 @@ async def start_effect( 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 @@ async def start_effect( 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 @@ async def start_effect( 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 e60e7fa0ae8653..1ea3a6ed9d611c 100644 --- a/homeassistant/components/motion_blinds/cover.py +++ b/homeassistant/components/motion_blinds/cover.py @@ -461,7 +461,7 @@ async def async_set_cover_position(self, **kwargs: Any) -> None: 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 7b0675e7e8e98b..bb4980b7c640e8 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 a506cb37c8832c..184dba9c6df84d 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 970e987cc1d0c0..130e9ae4be1389 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"