Skip to content

Commit

Permalink
Fix LINT warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus authored and Markus committed Nov 10, 2023
1 parent 656debd commit 9210129
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 17 deletions.
19 changes: 7 additions & 12 deletions custom_components/unifi_voucher/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,21 @@
from __future__ import annotations

import asyncio
import ssl
from dataclasses import dataclass

from aiohttp import CookieJar
import aiounifi
from aiounifi.interfaces.api_handlers import ItemEvent
from aiounifi.interfaces.sites import Sites
from aiounifi.models.configuration import Configuration
from aiounifi.models.api import ApiItem, ApiRequest
from aiounifi.models.api import ApiRequest

from homeassistant.core import (
callback,
HomeAssistant,
)
from homeassistant.helpers import aiohttp_client
from homeassistant.helpers.dispatcher import (
async_dispatcher_connect,
async_dispatcher_send,
)

from .const import (
LOGGER,
DOMAIN,
)

RETRY_TIMER = 15
Expand Down Expand Up @@ -52,7 +44,7 @@ class UnifiVoucherListRequest(ApiRequest):
@classmethod
def create(
cls
) -> Self:
) -> self:
"""Create voucher list request."""
return cls(
method="get",
Expand All @@ -73,7 +65,7 @@ def create(
down_bandwidth: int | None = None,
byte_quota: int | None = None,
note: str | None = None,
) -> Self:
) -> self:
"""
Create voucher create request.
Expand Down Expand Up @@ -214,6 +206,9 @@ async def check_api_user(
)
raise UnifiVoucherApiAuthenticationError from err
except aiounifi.AiounifiException as err:
LOGGER.exception("Unknown UniFi Network communication error occurred: %s", err)
LOGGER.exception(
"Unknown UniFi Network communication error occurred: %s",
err,
)
raise UnifiVoucherApiError from err
return False
3 changes: 0 additions & 3 deletions custom_components/unifi_voucher/config_flow.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
"""Adds config flow for UniFi Hotspot Manager."""
from __future__ import annotations

from aiounifi.interfaces.sites import Sites
from aiounifi.models.site import Site

from homeassistant.core import (
callback,
HomeAssistant,
Expand Down
2 changes: 0 additions & 2 deletions custom_components/unifi_voucher/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
CONF_PORT,
CONF_USERNAME,
CONF_VERIFY_SSL,
ATTR_STATE,
ATTR_TEMPERATURE,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.helpers.update_coordinator import (
Expand Down

0 comments on commit 9210129

Please sign in to comment.