From a0f6fbf7594ce482c00e0c9ec3d9c657ef639cc2 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 26 Sep 2024 21:46:43 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- docs/index.rst | 2 +- socs/agents/ifm_kq1001_levelsensor/agent.py | 10 +++++----- socs/plugin.py | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index 260812f63..d07b5674f 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -54,7 +54,7 @@ API Reference Full API documentation for core parts of the SOCS library. agents/holo_fpga agents/holo_synth agents/ibootbar - agents/ifm_kq1001_levelsensor + agents/ifm_kq1001_levelsensor agents/ifm_sbn246_flowmeter agents/labjack agents/lakeshore240 diff --git a/socs/agents/ifm_kq1001_levelsensor/agent.py b/socs/agents/ifm_kq1001_levelsensor/agent.py index 421c35afe..378f76f64 100644 --- a/socs/agents/ifm_kq1001_levelsensor/agent.py +++ b/socs/agents/ifm_kq1001_levelsensor/agent.py @@ -24,7 +24,7 @@ def extract(value): The level in % and the device status. """ - binary = bin(int(value,16))[2:].zfill(32) + binary = bin(int(value, 16))[2:].zfill(32) # Decode all of the process data fields, but most of them don't # matter. _b_pdv1 = binary[0:16] @@ -34,10 +34,10 @@ def extract(value): _b_out2 = binary[30:31] _b_out1 = binary[31:32] - pdv1 = int(_b_pdv1,2)*1.0 - device_status = int(_b_device_status,2) - - return pdv1,device_status + pdv1 = int(_b_pdv1, 2) * 1.0 + device_status = int(_b_device_status, 2) + + return pdv1, device_status class LevelSensorAgent: diff --git a/socs/plugin.py b/socs/plugin.py index 2be5f18d4..8925aafd9 100644 --- a/socs/plugin.py +++ b/socs/plugin.py @@ -6,7 +6,7 @@ 'CryomechCPAAgent': {'module': 'socs.agents.cryomech_cpa.agent', 'entry_point': 'main'}, 'FPGAAgent': {'module': 'socs.agents.holo_fpga.agent', 'entry_point': 'main'}, 'FlowmeterAgent': {'module': 'socs.agents.ifm_sbn246_flowmeter.agent', 'entry_point': 'main'}, - 'LevelSensorAgent': {'module': 'socs.agents.ifm_kq1001_levelsensor.agent', 'entry_point': 'main'}, + 'LevelSensorAgent': {'module': 'socs.agents.ifm_kq1001_levelsensor.agent', 'entry_point': 'main'}, 'FTSAerotechAgent': {'module': 'socs.agents.fts_aerotech.agent', 'entry_point': 'main'}, 'GeneratorAgent': {'module': 'socs.agents.generator.agent', 'entry_point': 'main'}, 'Hi6200Agent': {'module': 'socs.agents.hi6200.agent', 'entry_point': 'main'},