Skip to content

Commit

Permalink
Make items into walrus
Browse files Browse the repository at this point in the history
  • Loading branch information
allenporter committed Nov 29, 2023
1 parent 5aad0b3 commit 25862b0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions homeassistant/components/todoist/todo.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ async def async_setup_entry(
def _task_api_data(item: TodoItem) -> dict[str, Any]:
"""Convert a TodoItem to the set of add or update arguments."""
item_data: dict[str, Any] = {}
if item.summary:
item_data["content"] = item.summary
if summary := item.summary:
item_data["content"] = summary
if due := item.due:
if isinstance(due, datetime.datetime):
item_data["due"] = {
Expand All @@ -45,8 +45,8 @@ def _task_api_data(item: TodoItem) -> dict[str, Any]:
}
else:
item_data["due"] = {"date": due.isoformat()}
if item.description:
item_data["description"] = item.description
if description := item.description:
item_data["description"] = description
return item_data


Expand Down

0 comments on commit 25862b0

Please sign in to comment.