[file.gdsii] attributes may have key=126

This commit is contained in:
jan 2025-10-12 23:34:39 -07:00
parent 325a8b9590
commit 4d74eea253

View File

@ -411,8 +411,8 @@ def _annotations_to_properties(annotations: annotations_t, max_len: int = 126) -
i = int(key) i = int(key)
except ValueError as err: except ValueError as err:
raise PatternError(f'Annotation key {key} is not convertable to an integer') from err raise PatternError(f'Annotation key {key} is not convertable to an integer') from err
if not (0 < i < 126): if not (0 < i <= 126):
raise PatternError(f'Annotation key {key} converts to {i} (must be in the range [1,125])') 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) val_strings = ' '.join(str(val) for val in vals)
b = val_strings.encode() b = val_strings.encode()