Skip to content

Commit

Permalink
maint: Sourcery recommended changes
Browse files Browse the repository at this point in the history
  • Loading branch information
RogerSelwyn committed Nov 28, 2024
1 parent 06ee95d commit 629c980
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,7 @@ async def _async_todo_sensors(self):
YAML_TODO_LIST_SCHEMA,
)
ms365_todo_lists = list(ms365_task_dict.values())
keys = await self._async_todo_entities(ms365_todo_lists)

return keys
return await self._async_todo_entities(ms365_todo_lists)

async def _async_todo_entities(self, ms365_todo_lists):
keys = []
Expand Down
7 changes: 3 additions & 4 deletions tests/integration/test_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ async def test_todo_services_ha(
requests_mock: Mocker,
) -> None:
"""Test HA Services."""
listener = 0

list_name = "todo.test_todo_list_2"
mock_call(requests_mock, URL.TODO_SAVE, "todo_save", method="post")
mock_call(requests_mock, URL.TODO_GET_1, "todo_get_1")
Expand Down Expand Up @@ -79,7 +79,7 @@ async def test_todo_services_ha(
return_response=False,
)
await hass.async_block_till_done()
listener += 1
listener = 1
assert len(listener_setup.events) == listener
assert [x for x in listener_setup.events if x.event_type == f"{DOMAIN}_new_todo"]

Expand Down Expand Up @@ -163,7 +163,6 @@ async def test_todo_services_ms365(
requests_mock: Mocker,
) -> None:
"""Test HA Services."""
listener = 0
list_name = "todo.test_todo_list_1"
mock_call(requests_mock, URL.TODO_SAVE, "todo_save", method="post")
mock_call(requests_mock, URL.TODO_GET_1, "todo_get_1")
Expand All @@ -181,7 +180,7 @@ async def test_todo_services_ms365(
return_response=False,
)
await hass.async_block_till_done()
listener += 1
listener = 1
assert len(listener_setup.events) == listener
assert [x for x in listener_setup.events if x.event_type == f"{DOMAIN}_new_todo"]

Expand Down

0 comments on commit 629c980

Please sign in to comment.