From 5ffcadb36236096ad4ea162d7fa1e5b0e53aa74e Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Tue, 7 Feb 2023 14:25:56 -0800 Subject: [PATCH] always apply postprocess --- masque/file/gdsii.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/masque/file/gdsii.py b/masque/file/gdsii.py index 414c1d3..cb55a37 100644 --- a/masque/file/gdsii.py +++ b/masque/file/gdsii.py @@ -542,7 +542,10 @@ def load_library( # Full load approach (immediately load everything) patterns, library_info = read(stream) for name, pattern in patterns.items(): - lib[name] = lambda: pattern + if postprocess is not None: + lib[name] = postprocess(lib, name, pattern) + else: + lib[name] = pattern return lib, library_info # Normal approach (scan and defer load)