From b4a2e89ae878af655bcb73df16dc57f2adb96f5c Mon Sep 17 00:00:00 2001 From: sldesnoo-Delft <s.l.desnoo@tudelft.nl> Date: Mon, 29 Jan 2024 17:07:23 +0100 Subject: [PATCH] Allow longer channel names --- pulse_lib/base_pulse.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pulse_lib/base_pulse.py b/pulse_lib/base_pulse.py index be2d5f0c..8be7e2db 100644 --- a/pulse_lib/base_pulse.py +++ b/pulse_lib/base_pulse.py @@ -635,9 +635,9 @@ class pulselib: def _check_uniqueness_of_channel_name(self, channel_name): if len(channel_name) < 2: - raise Exception(f"Channel name '{channel_name}' is too short") - if len(channel_name) > 10: - raise Exception(f"Channel name '{channel_name}' is too long") + raise Exception(f"Channel name '{channel_name}' is too short. Min is 2") + if len(channel_name) > 16: + raise Exception(f"Channel name '{channel_name}' is too long. Max is 16.") if '{' in channel_name: raise Exception(f"Illegal channel name '{channel_name}'. Did you forget the f in front of the string?") if not re.match(r"^[A-Za-z][A-Za-z0-9_]*$", channel_name): -- GitLab