Enable Ruff rule PT007 (#113764)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
parent
089a3ab6d7
commit
00ec7f11f0
204 changed files with 908 additions and 921 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue