From f3e13cbb0b5df0fca5e4916009e76d8a66398a78 Mon Sep 17 00:00:00 2001 From: atse Date: Fri, 4 Aug 2023 14:31:31 +0800 Subject: [PATCH] List comprehension --- pytec/tec_qt.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pytec/tec_qt.py b/pytec/tec_qt.py index 685e91e..bde1c9b 100644 --- a/pytec/tec_qt.py +++ b/pytec/tec_qt.py @@ -65,8 +65,8 @@ THERMOSTAT_PARAMETERS = [[ params = [ - CommandsParameter.create(name='Thermostat Channel 0 Parameters', type='group', value=0, children=THERMOSTAT_PARAMETERS[0]), - CommandsParameter.create(name='Thermostat Channel 1 Parameters', type='group', value=1, children=THERMOSTAT_PARAMETERS[1]), + CommandsParameter.create(name=f"Thermostat Channel {ch} Parameters", type='group', value=ch, children=THERMOSTAT_PARAMETERS[ch]) + for ch in range(2) ]