From 48eccdc55cb97fed78b998c84d71f6e0a9381001 Mon Sep 17 00:00:00 2001 From: Steve Saunders Date: Thu, 5 Dec 2024 00:21:50 +1100 Subject: [PATCH] Remove unused timedelta, a typo and pylance warning --- custom_components/solcast_solar/__init__.py | 5 ++--- custom_components/solcast_solar/solcastapi.py | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/custom_components/solcast_solar/__init__.py b/custom_components/solcast_solar/__init__.py index c1ab478a..98952da4 100644 --- a/custom_components/solcast_solar/__init__.py +++ b/custom_components/solcast_solar/__init__.py @@ -2,14 +2,13 @@ import asyncio import contextlib -from datetime import timedelta import json import logging import random import traceback from typing import Any, Final -import aiofiles # type: ignore # noqa: PGH003 +import aiofiles import voluptuous as vol from homeassistant import loader @@ -771,7 +770,7 @@ async def async_migrate_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: An integration downgrade must not cause any issues when future options have been configured, with future options then just being unused. To be clear, the intent or characteristics of an option cannot change with an upgrade, so if an intent does change - then an new option must be used (for example, HARD_LIMIT to HARD_LIMIT_API). Prior + then a new option must be used (for example, HARD_LIMIT to HARD_LIMIT_API). Prior versions must cope with the absence of an option should one be deleted. The present version (e.g. `VERSION = 14`) is specified in `config_flow.py`. diff --git a/custom_components/solcast_solar/solcastapi.py b/custom_components/solcast_solar/solcastapi.py index e20e5066..969c43ae 100644 --- a/custom_components/solcast_solar/solcastapi.py +++ b/custom_components/solcast_solar/solcastapi.py @@ -26,10 +26,10 @@ import traceback from typing import Any, Final, cast -import aiofiles # type: ignore # noqa: PGH003 +import aiofiles from aiohttp import ClientConnectionError, ClientSession from aiohttp.client_reqrep import ClientResponse -from isodate import parse_datetime # type: ignore # noqa: PGH003 +from isodate import parse_datetime from homeassistant.config_entries import ConfigEntry from homeassistant.const import CONF_API_KEY