From 3429821b2562d357e2a8a2db79c6a8ece8a7d112 Mon Sep 17 00:00:00 2001 From: Teemu Rytilahti Date: Fri, 23 Feb 2024 16:12:28 +0100 Subject: [PATCH] Fix linting --- kasa/smart/modules/firmware.py | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/kasa/smart/modules/firmware.py b/kasa/smart/modules/firmware.py index b1302b37..14a23aaa 100644 --- a/kasa/smart/modules/firmware.py +++ b/kasa/smart/modules/firmware.py @@ -1,7 +1,6 @@ """Implementation of firmware module.""" from __future__ import annotations -import asyncio import asyncio import logging @@ -13,14 +12,13 @@ from typing import TYPE_CHECKING, Any, Optional from async_timeout import timeout as asyncio_timeout from pydantic.v1 import BaseModel, Field, validator -from ...exceptions import SmartErrorCode -from ...feature import Feature -from ..smartmodule import SmartModule - # When support for cpython older than 3.11 is dropped # async_timeout can be replaced with asyncio.timeout from async_timeout import timeout as asyncio_timeout +from ...exceptions import SmartErrorCode +from ...feature import Feature, FeatureType +from ..smartmodule import SmartModule if TYPE_CHECKING: from ..smartdevice import SmartDevice @@ -106,10 +104,20 @@ class Firmware(SmartModule): ) ) self._add_feature( - Feature(device, "Current firmware version", container=self, attribute_getter="current_firmware") + Feature( + device, + "Current firmware version", + container=self, + attribute_getter="current_firmware", + ) ) self._add_feature( - Feature(device, "Available firmware version", container=self, attribute_getter="latest_firmware") + Feature( + device, + "Available firmware version", + container=self, + attribute_getter="latest_firmware", + ) ) def query(self) -> dict: @@ -124,7 +132,6 @@ class Firmware(SmartModule): """Return the current firmware version.""" return self._device.hw_info["sw_ver"] - @property def latest_firmware(self) -> str: """Return the latest firmware version."""