From 0ed813515aaf48c85f2d2f4c376f1602c81c73f8 Mon Sep 17 00:00:00 2001 From: Francois JUMELLE Date: Mon, 16 Oct 2023 00:30:15 +0200 Subject: [PATCH] Remove warnings --- run.py | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/run.py b/run.py index 8a23cee..7935313 100644 --- a/run.py +++ b/run.py @@ -1,7 +1,8 @@ +"""Fake script simulating Domoticz""" +#pylint: disable=line-too-long import os import time import Domoticz -import plugin def function_read_properties(filename:str, sep:str='=', comment_char:str='#')->dict: """Convert a .properties file into a dictionary""" @@ -18,32 +19,32 @@ def function_read_properties(filename:str, sep:str='=', comment_char:str='#')->d return dictionary -"""Read Parameter file? Format should be: -Address=xxx -Port=xxx -Username=xxx -Password=xxx -Mode1=xxx -Mode2=xxx -Mode3=xxx -Mode4=xxx -Mode5=xxx -Mode6=xxx -""" +# """Read Parameter file? Format should be: +# Address=xxx +# Port=xxx +# Username=xxx +# Password=xxx +# Mode1=xxx +# Mode2=xxx +# Mode3=xxx +# Mode4=xxx +# Mode5=xxx +# Mode6=xxx +# """ Parameters = function_read_properties(os.path.join(os.path.dirname(__file__), "parameters.properties")) Images = Domoticz.Images Devices = Domoticz.Devices with open("./plugin.py", 'rb') as fileobj: - exec(compile(fileobj.read(), "plugin.py", 'exec'), globals(), globals()) + exec(compile(fileobj.read(), "plugin.py", 'exec'), globals(), globals()) #pylint: disable=exec-used -onStart() +onStart() #pylint: disable=undefined-variable # type: ignore try: while True: Domoticz.Log("## Plugin Heartbeat ##") - onHeartbeat() + onHeartbeat() #pylint: disable=undefined-variable # type: ignore time.sleep(Domoticz.domo.GetHeartbeat()) finally: - onStop() + onStop() #pylint: disable=undefined-variable # type: ignore