fix sonar qube warnings

This commit is contained in:
Stefan Allius
2024-10-04 01:50:24 +02:00
parent 949f3c9608
commit 3a94afb48d
2 changed files with 4 additions and 3 deletions

View File

@@ -48,7 +48,7 @@ class InverterIfc(metaclass=AbstractIterMeta):
pass # pragma: no cover
@abstractmethod
async def disc(self, shutdown_started=False) -> None:
async def disc(self, shutdown_started=False) -> None:
pass # pragma: no cover
@abstractmethod

View File

@@ -6,6 +6,7 @@ from asyncio import StreamReader, StreamWriter
from aiohttp import web
from logging import config # noqa F401
from inverter import Inverter
from inverter_base import InverterIfc
from gen3.inverter_g3 import InverterG3
from gen3plus.inverter_g3p import InverterG3P
from scheduler import Schedule
@@ -37,7 +38,7 @@ async def healthy(request):
if proxy_is_up:
# logging.info('web reqeust healthy()')
for inverter in Inverter:
for inverter in InverterIfc:
try:
res = inverter.healthy()
if not res:
@@ -86,7 +87,7 @@ async def handle_shutdown(web_task):
#
# first, disc all open TCP connections gracefully
#
for inverter in Inverter:
async for inverter in InverterIfc:
await inverter.disc(True)
logging.info('Proxy disconnecting done')