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
|
@ -227,23 +227,11 @@ async def test_list_todo_items(
|
|||
[
|
||||
({}, [ITEM_1, ITEM_2]),
|
||||
(
|
||||
[
|
||||
{"status": [TodoItemStatus.COMPLETED, TodoItemStatus.NEEDS_ACTION]},
|
||||
[ITEM_1, ITEM_2],
|
||||
]
|
||||
),
|
||||
(
|
||||
[
|
||||
{"status": [TodoItemStatus.NEEDS_ACTION]},
|
||||
[ITEM_1],
|
||||
]
|
||||
),
|
||||
(
|
||||
[
|
||||
{"status": [TodoItemStatus.COMPLETED]},
|
||||
[ITEM_2],
|
||||
]
|
||||
{"status": [TodoItemStatus.COMPLETED, TodoItemStatus.NEEDS_ACTION]},
|
||||
[ITEM_1, ITEM_2],
|
||||
),
|
||||
({"status": [TodoItemStatus.NEEDS_ACTION]}, [ITEM_1]),
|
||||
({"status": [TodoItemStatus.COMPLETED]}, [ITEM_2]),
|
||||
],
|
||||
)
|
||||
async def test_get_items_service(
|
||||
|
@ -390,7 +378,7 @@ async def test_add_item_service_invalid_input(
|
|||
|
||||
@pytest.mark.parametrize(
|
||||
("supported_entity_feature", "item_data", "expected_item"),
|
||||
(
|
||||
[
|
||||
(
|
||||
TodoListEntityFeature.SET_DUE_DATE_ON_ITEM,
|
||||
{"item": "New item", "due_date": "2023-11-13"},
|
||||
|
@ -436,7 +424,7 @@ async def test_add_item_service_invalid_input(
|
|||
description="Submit revised draft",
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
async def test_add_item_service_extended_fields(
|
||||
hass: HomeAssistant,
|
||||
|
@ -695,7 +683,7 @@ async def test_update_todo_item_field_unsupported(
|
|||
|
||||
@pytest.mark.parametrize(
|
||||
("supported_entity_feature", "update_data", "expected_update"),
|
||||
(
|
||||
[
|
||||
(
|
||||
TodoListEntityFeature.SET_DUE_DATE_ON_ITEM,
|
||||
{"due_date": "2023-11-13"},
|
||||
|
@ -726,7 +714,7 @@ async def test_update_todo_item_field_unsupported(
|
|||
description="Submit revised draft",
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
async def test_update_todo_item_extended_fields(
|
||||
hass: HomeAssistant,
|
||||
|
@ -756,7 +744,7 @@ async def test_update_todo_item_extended_fields(
|
|||
|
||||
@pytest.mark.parametrize(
|
||||
("test_entity_items", "update_data", "expected_update"),
|
||||
(
|
||||
[
|
||||
(
|
||||
[TodoItem(uid="1", summary="Summary", description="description")],
|
||||
{"description": "Submit revised draft"},
|
||||
|
@ -804,7 +792,7 @@ async def test_update_todo_item_extended_fields(
|
|||
{"due_datetime": None},
|
||||
TodoItem(uid="1", summary="Summary"),
|
||||
),
|
||||
),
|
||||
],
|
||||
ids=[
|
||||
"overwrite_description",
|
||||
"overwrite_empty_description",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue