Skip to content

Commit

Permalink
Autopep applied v2
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeBojan committed Feb 29, 2024
1 parent 5b66c0a commit 84698c5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/rest_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
errorLogger = logging.getLogger('customErrorLogger')
customLogger = logging.getLogger('customConsoleLogger')


class FuelSettings(BaseModel):
level_limit: int
mode: str
Expand Down Expand Up @@ -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))
Expand Down
4 changes: 3 additions & 1 deletion src/sensor_devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
max-line-length = 120

[pydocstyle]
ignore = D100, D101, D102, D107
ignore = D100, D101, D102, D107, W504

0 comments on commit 84698c5

Please sign in to comment.