Enable RUF059 and fix violations (#152071)

This commit is contained in:
Joost Lekkerkerker
2025-09-10 21:16:09 +02:00
committed by GitHub
parent 46c38f185c
commit e3c0cfd1e2
46 changed files with 125 additions and 122 deletions

View File

@@ -654,14 +654,14 @@ async def test_shared_context(hass: HomeAssistant) -> None:
assert event_mock.call_count == 1
assert run_mock.call_count == 1
args, kwargs = run_mock.call_args
args, _kwargs = run_mock.call_args
assert args[0].context == context
# Ensure event data has all attributes set
assert args[0].data.get(ATTR_NAME) == "test"
assert args[0].data.get(ATTR_ENTITY_ID) == "script.test"
# Ensure context carries through the event
args, kwargs = event_mock.call_args
args, _kwargs = event_mock.call_args
assert args[0].context == context
# Ensure the script state shares the same context