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", "on", "on", {}, {}, {"all": False}, {}),
("binary_sensor", "on", "on", {}, {"all": True}, {"all": True}, {}),
("cover", "open", "open", {}, {}, {}, {}),
@ -56,7 +56,7 @@ from tests.typing import WebSocketGenerator
{},
),
("switch", "on", "on", {}, {}, {}, {}),
),
],
)
async def test_config_flow(
hass: HomeAssistant,
@ -129,11 +129,11 @@ async def test_config_flow(
@pytest.mark.parametrize(
("hide_members", "hidden_by"), ((False, None), (True, "integration"))
("hide_members", "hidden_by"), [(False, None), (True, "integration")]
)
@pytest.mark.parametrize(
("group_type", "extra_input"),
(
[
("binary_sensor", {"all": False}),
("cover", {}),
("event", {}),
@ -142,7 +142,7 @@ async def test_config_flow(
("lock", {}),
("media_player", {}),
("switch", {}),
),
],
)
async def test_config_flow_hides_members(
hass: HomeAssistant,
@ -210,7 +210,7 @@ def get_suggested(schema, key):
@pytest.mark.parametrize(
("group_type", "member_state", "extra_options", "options_options"),
(
[
("binary_sensor", "on", {"all": False}, {}),
("cover", "open", {}, {}),
("event", "2021-01-01T23:59:59.123+00:00", {}, {}),
@ -225,7 +225,7 @@ def get_suggested(schema, key):
{"ignore_non_numeric": False, "type": "sum"},
),
("switch", "on", {"all": False}, {}),
),
],
)
async def test_options(
hass: HomeAssistant, group_type, member_state, extra_options, options_options
@ -316,7 +316,7 @@ async def test_options(
@pytest.mark.parametrize(
("group_type", "extra_options", "extra_options_after", "advanced"),
(
[
("light", {"all": False}, {"all": False}, False),
("light", {"all": True}, {"all": True}, False),
("light", {"all": False}, {"all": False}, True),
@ -325,7 +325,7 @@ async def test_options(
("switch", {"all": True}, {"all": True}, False),
("switch", {"all": False}, {"all": False}, True),
("switch", {"all": True}, {"all": False}, True),
),
],
)
async def test_all_options(
hass: HomeAssistant, group_type, extra_options, extra_options_after, advanced
@ -387,14 +387,14 @@ async def test_all_options(
@pytest.mark.parametrize(
("hide_members", "hidden_by_initial", "hidden_by"),
(
[
(False, er.RegistryEntryHider.INTEGRATION, None),
(True, None, er.RegistryEntryHider.INTEGRATION),
),
],
)
@pytest.mark.parametrize(
("group_type", "extra_input"),
(
[
("binary_sensor", {"all": False}),
("cover", {}),
("event", {}),
@ -403,7 +403,7 @@ async def test_all_options(
("lock", {}),
("media_player", {}),
("switch", {}),
),
],
)
async def test_options_flow_hides_members(
hass: HomeAssistant,