Enable Ruff rule PT007 (#113764)

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
Sid 2024-03-19 09:01:07 +01:00 committed by GitHub
parent 089a3ab6d7
commit 00ec7f11f0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
204 changed files with 908 additions and 921 deletions

View file

@ -26,7 +26,7 @@ from tests.typing import WebSocketGenerator
"extra_options",
"extra_attrs",
),
(
[
(
"binary_sensor",
"{{ states('binary_sensor.one') == 'on' or states('binary_sensor.two') == 'on' }}",
@ -47,7 +47,7 @@ from tests.typing import WebSocketGenerator
{},
{},
),
),
],
)
async def test_config_flow(
hass: HomeAssistant,
@ -142,7 +142,7 @@ def get_suggested(schema, key):
"extra_options",
"options_options",
),
(
[
(
"binary_sensor",
"{{ states('binary_sensor.one') == 'on' or states('binary_sensor.two') == 'on' }}",
@ -161,7 +161,7 @@ def get_suggested(schema, key):
{},
{},
),
),
],
)
async def test_options(
hass: HomeAssistant,
@ -261,7 +261,7 @@ async def test_options(
"extra_attributes",
"listeners",
),
(
[
(
"binary_sensor",
"{{ states.binary_sensor.one.state == 'on' or states.binary_sensor.two.state == 'on' }}",
@ -280,7 +280,7 @@ async def test_options(
[{}, {}],
[["one", "two"], ["one", "two"]],
),
),
],
)
async def test_config_flow_preview(
hass: HomeAssistant,
@ -644,13 +644,13 @@ async def test_config_flow_preview_template_error(
"state_template",
"extra_user_input",
),
(
[
(
"sensor",
"{{ states('sensor.one') }}",
{"unit_of_measurement": "°C"},
),
),
],
)
async def test_config_flow_preview_bad_state(
hass: HomeAssistant,