Enable Ruff PT006 (#88165)
* Enable Ruff PT006 * Adjust existing cases * Fix tests * Remove unneeded parentheses
This commit is contained in:
parent
6f38bc274a
commit
ed79265843
411 changed files with 1532 additions and 1123 deletions
|
@ -33,7 +33,7 @@ _OSC_INPUT = "input_select.osc"
|
|||
_DIRECTION_INPUT_SELECT = "input_select.direction"
|
||||
|
||||
|
||||
@pytest.mark.parametrize("count,domain", [(1, DOMAIN)])
|
||||
@pytest.mark.parametrize(("count", "domain"), [(1, DOMAIN)])
|
||||
@pytest.mark.parametrize(
|
||||
"config",
|
||||
[
|
||||
|
@ -56,7 +56,7 @@ async def test_missing_optional_config(hass, start_ha):
|
|||
_verify(hass, STATE_ON, None, None, None, None)
|
||||
|
||||
|
||||
@pytest.mark.parametrize("count,domain", [(0, DOMAIN)])
|
||||
@pytest.mark.parametrize(("count", "domain"), [(0, DOMAIN)])
|
||||
@pytest.mark.parametrize(
|
||||
"config",
|
||||
[
|
||||
|
@ -123,7 +123,7 @@ async def test_wrong_template_config(hass, start_ha):
|
|||
assert hass.states.async_all("fan") == []
|
||||
|
||||
|
||||
@pytest.mark.parametrize("count,domain", [(1, DOMAIN)])
|
||||
@pytest.mark.parametrize(("count", "domain"), [(1, DOMAIN)])
|
||||
@pytest.mark.parametrize(
|
||||
"config",
|
||||
[
|
||||
|
@ -184,7 +184,7 @@ async def test_templates_with_entities(hass, start_ha):
|
|||
_verify(hass, STATE_OFF, 0, True, DIRECTION_FORWARD, None)
|
||||
|
||||
|
||||
@pytest.mark.parametrize("count,domain", [(1, DOMAIN)])
|
||||
@pytest.mark.parametrize(("count", "domain"), [(1, DOMAIN)])
|
||||
@pytest.mark.parametrize(
|
||||
"config,entity,tests",
|
||||
[
|
||||
|
@ -248,7 +248,7 @@ async def test_templates_with_entities2(hass, entity, tests, start_ha):
|
|||
_verify(hass, STATE_ON, test_percentage, None, None, test_type)
|
||||
|
||||
|
||||
@pytest.mark.parametrize("count,domain", [(1, DOMAIN)])
|
||||
@pytest.mark.parametrize(("count", "domain"), [(1, DOMAIN)])
|
||||
@pytest.mark.parametrize(
|
||||
"config",
|
||||
[
|
||||
|
@ -279,7 +279,7 @@ async def test_availability_template_with_entities(hass, start_ha):
|
|||
assert (hass.states.get(_TEST_FAN).state != STATE_UNAVAILABLE) == test_assert
|
||||
|
||||
|
||||
@pytest.mark.parametrize("count,domain", [(1, DOMAIN)])
|
||||
@pytest.mark.parametrize(("count", "domain"), [(1, DOMAIN)])
|
||||
@pytest.mark.parametrize(
|
||||
"config, states",
|
||||
[
|
||||
|
@ -359,7 +359,7 @@ async def test_template_with_unavailable_entities(hass, states, start_ha):
|
|||
_verify(hass, states[0], states[1], states[2], states[3], None)
|
||||
|
||||
|
||||
@pytest.mark.parametrize("count,domain", [(1, DOMAIN)])
|
||||
@pytest.mark.parametrize(("count", "domain"), [(1, DOMAIN)])
|
||||
@pytest.mark.parametrize(
|
||||
"config",
|
||||
[
|
||||
|
@ -889,7 +889,7 @@ async def _register_components(
|
|||
await hass.async_block_till_done()
|
||||
|
||||
|
||||
@pytest.mark.parametrize("count,domain", [(1, DOMAIN)])
|
||||
@pytest.mark.parametrize(("count", "domain"), [(1, DOMAIN)])
|
||||
@pytest.mark.parametrize(
|
||||
"config",
|
||||
[
|
||||
|
@ -932,7 +932,7 @@ async def test_unique_id(hass, start_ha):
|
|||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"speed_count, percentage_step", [(0, 1), (100, 1), (3, 100 / 3)]
|
||||
("speed_count", "percentage_step"), [(0, 1), (100, 1), (3, 100 / 3)]
|
||||
)
|
||||
async def test_implemented_percentage(hass, speed_count, percentage_step):
|
||||
"""Test a fan that implements percentage."""
|
||||
|
@ -1008,7 +1008,7 @@ async def test_implemented_percentage(hass, speed_count, percentage_step):
|
|||
assert attributes.get("supported_features") & FanEntityFeature.SET_SPEED
|
||||
|
||||
|
||||
@pytest.mark.parametrize("count,domain", [(1, DOMAIN)])
|
||||
@pytest.mark.parametrize(("count", "domain"), [(1, DOMAIN)])
|
||||
@pytest.mark.parametrize(
|
||||
"config",
|
||||
[
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue