From 4b8a0d2795174c0855cc2a4ba57beb2f6abb1f20 Mon Sep 17 00:00:00 2001 From: Chris Fiege Date: Wed, 30 Oct 2024 11:49:58 +0100 Subject: [PATCH] river/power/gude8031: Apply ruff format Signed-off-by: Chris Fiege --- labgrid/driver/power/gude8031.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/labgrid/driver/power/gude8031.py b/labgrid/driver/power/gude8031.py index dccacc45e..91cbc0dc9 100644 --- a/labgrid/driver/power/gude8031.py +++ b/labgrid/driver/power/gude8031.py @@ -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 @@ -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