Skip to content

Commit

Permalink
river/power/gude8031: Apply ruff format
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Fiege <[email protected]>
  • Loading branch information
SmithChart committed Oct 30, 2024
1 parent 1ce0abb commit 4b8a0d2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions labgrid/driver/power/gude8031.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@

PORT = 80


def power_set(host, port, index, value):
index = int(index)
assert 1 <= index <= 8
# access the web interface...
value = 1 if value else 0
r = requests.get(
f"http://{host}:{port}/status.json?components=0&cmd=1&p={index}&s={value}"
)
r = requests.get(f"http://{host}:{port}/status.json?components=0&cmd=1&p={index}&s={value}")
r.raise_for_status()


def power_get(host, port, index):
index = int(index)
assert 1 <= index <= 8
Expand All @@ -32,6 +32,6 @@ def power_get(host, port, index):
r = requests.get(f"http://{host}:{port}/status.json?components=1")
r.raise_for_status()

state = r.json()['outputs'][index - 1]['state']
state = r.json()["outputs"][index - 1]["state"]

return state

0 comments on commit 4b8a0d2

Please sign in to comment.