Skip to content

Commit

Permalink
fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Kollmannsberger (ext.) committed Jan 30, 2024
1 parent 133b96f commit daec359
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
1 change: 1 addition & 0 deletions custom_components/hacs_vikunja_integration/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
"""Initalization file."""
from __future__ import annotations

from homeassistant.config_entries import ConfigEntry
Expand Down
5 changes: 3 additions & 2 deletions custom_components/hacs_vikunja_integration/api.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
"""Connector file to define api access to vikunja api."""
from __future__ import annotations

import asyncio
Expand Down Expand Up @@ -38,7 +39,7 @@ def __init__(
self._session = session

async def list_projects(self) -> list[dict[str, any]]:
"""List all accessable projects"""
"""List all accessable projects."""
headers = {
"Authorization": f"Bearer {self._api_key}",
"Content-type": "application/json; charset=UTF-8",
Expand Down Expand Up @@ -108,4 +109,4 @@ async def _api_wrapper(
except Exception as exception: # pylint: disable=broad-except
raise HacsVikunjaIntegrationApiClientError(
"Something really wrong happened!"
) from exception
) from exception
3 changes: 2 additions & 1 deletion custom_components/hacs_vikunja_integration/const.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
"""Define constants."""
from logging import Logger, getLogger

LOGGER: Logger = getLogger(__package__)
Expand All @@ -6,4 +7,4 @@
DOMAIN = "hacs_vikunja_integration"
VERSION = "0.0.1"
CONF_API_URL = "api_url"
CONF_API_KEY = "api_key"
CONF_API_KEY = "api_key"
3 changes: 2 additions & 1 deletion custom_components/hacs_vikunja_integration/coordinator.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
"""Define data handling inside home assistant."""
from __future__ import annotations

from datetime import timedelta
Expand All @@ -15,7 +16,7 @@
HacsVikunjaIntegrationApiClientAuthenticationError,
HacsVikunjaIntegrationApiClientError,
)
from .const import DOMAIN, LOGGER
from .const import LOGGER


class VikunjaDataUpdateCoordinator(DataUpdateCoordinator):
Expand Down
5 changes: 2 additions & 3 deletions custom_components/hacs_vikunja_integration/todo.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from __future__ import annotations

from datetime import date, datetime, timedelta
from typing import Any, cast
from typing import cast

from homeassistant.components.todo import (
TodoItem,
Expand Down Expand Up @@ -118,7 +118,6 @@ def todo_items(self) -> list[TodoItem] | None:

async def async_update_todo_item(self, item: TodoItem) -> None:
"""Update a To-do item."""
print("Running task update")
uid: str = cast(str, item.uid)
await self.coordinator.client.update_task(
self._project_id,
Expand Down Expand Up @@ -157,4 +156,4 @@ async def async_update_todo_item(self, item: TodoItem) -> None:
# """
# parents = [task for task in tasks if task.get("parent") is None]
# parents.sort(key=lambda task: task["position"])
# return parents
# return parents

0 comments on commit daec359

Please sign in to comment.