1
0
mirror of https://github.com/home-assistant/supervisor.git synced 2026-05-08 08:58:31 +01:00

Bump pre-commit ruff to 0.5.7 and reformat (#5242)

It seems that the codebase is not formatted with the latest ruff
version. This PR reformats the codebase with ruff 0.5.7.
This commit is contained in:
Stefan Agner
2024-08-13 20:53:56 +02:00
committed by GitHub
parent 21ae2c2e54
commit f6faa18409
304 changed files with 1173 additions and 617 deletions
+9 -5
View File
@@ -68,11 +68,15 @@ def test_ota_url_os_name_rel_5_downgrade(coresys: CoreSys) -> None:
async def test_update_fails_if_out_of_date(coresys: CoreSys) -> None:
"""Test update of OS fails if Supervisor is out of date."""
coresys.core.state = CoreState.RUNNING
with patch.object(
type(coresys.supervisor), "need_update", new=PropertyMock(return_value=True)
), patch.object(
type(coresys.os), "available", new=PropertyMock(return_value=True)
), pytest.raises(HassOSJobError):
with (
patch.object(
type(coresys.supervisor), "need_update", new=PropertyMock(return_value=True)
),
patch.object(
type(coresys.os), "available", new=PropertyMock(return_value=True)
),
pytest.raises(HassOSJobError),
):
await coresys.os.update()