From 5a4be886720c11926a90faa581c95bb2523093a8 Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Sun, 26 Oct 2025 18:43:45 -0700 Subject: [PATCH] [file.gdsii] enable wider annotation key range (to 126 inclusive) --- masque/file/gdsii.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/masque/file/gdsii.py b/masque/file/gdsii.py index 10f5a9a..6972cfa 100644 --- a/masque/file/gdsii.py +++ b/masque/file/gdsii.py @@ -418,8 +418,8 @@ def _annotations_to_properties(annotations: annotations_t, max_len: int = 126) - i = int(key) except ValueError as err: raise PatternError(f'Annotation key {key} is not convertable to an integer') from err - if not (0 < i < 126): - raise PatternError(f'Annotation key {key} converts to {i} (must be in the range [1,125])') + if not (0 < i <= 126): + raise PatternError(f'Annotation key {key} converts to {i} (must be in the range [1,126])') val_strings = ' '.join(str(val) for val in vals) b = val_strings.encode()