From 84698c560504de9ca52d0b2858d73130f12a2d94 Mon Sep 17 00:00:00 2001 From: CodeBojan Date: Thu, 29 Feb 2024 08:57:54 +0100 Subject: [PATCH] Autopep applied v2 --- src/rest_api.py | 3 ++- src/sensor_devices.py | 4 +++- src/setup.cfg | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/rest_api.py b/src/rest_api.py index 007b85b..5d59a81 100644 --- a/src/rest_api.py +++ b/src/rest_api.py @@ -17,6 +17,7 @@ errorLogger = logging.getLogger('customErrorLogger') customLogger = logging.getLogger('customConsoleLogger') + class FuelSettings(BaseModel): level_limit: int mode: str @@ -65,7 +66,7 @@ async def config_get(): @app.post("/config/") async def config_post(fluid_config: FluidConfig): try: - config = Config(conf_path, errorLogger, customLogger) # TODO + config = Config(conf_path, errorLogger, customLogger) # TODO config.try_open() config.set_fuel_settings(jsonable_encoder(fluid_config.fuel_settings)) config.set_temp_settings(jsonable_encoder(fluid_config.temp_settings)) diff --git a/src/sensor_devices.py b/src/sensor_devices.py index 79de580..76c48d6 100644 --- a/src/sensor_devices.py +++ b/src/sensor_devices.py @@ -462,7 +462,9 @@ def measure_load_randomly( try: customLogger.info("Load: " + data_pattern.format("{:.2f}".format(data[counter % - values_count]), str(time.strftime(time_format, time.localtime())), kg)) + values_count]), + str(time.strftime(time_format, time.localtime())), + kg)) # send data to MQTT broker client.publish(load_topic, data_pattern.format("{:.2f}".format(data[counter % values_count]), str( time.strftime(time_format, time.localtime())), kg), qos=qos) diff --git a/src/setup.cfg b/src/setup.cfg index c27e2b8..891a8f0 100644 --- a/src/setup.cfg +++ b/src/setup.cfg @@ -2,4 +2,4 @@ max-line-length = 120 [pydocstyle] -ignore = D100, D101, D102, D107 \ No newline at end of file +ignore = D100, D101, D102, D107, W504 \ No newline at end of file