From 2e8d06ad6ef39fcab74dcf077c6a94ed3bacac2c Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Wed, 8 Feb 2023 08:51:30 -0800 Subject: [PATCH] data_to_ports max_depth default to 0 Makes it more compatible with LazyLibrary -- with recursive approach, we have to load all the subcells to run ports2data, but those subcells may or may not exist (e.g. partial library, or maybe we've removed some duplicates-to-be prior to merging with a different lib) --- masque/utils/ports2data.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/masque/utils/ports2data.py b/masque/utils/ports2data.py index 52990fc..51f33ec 100644 --- a/masque/utils/ports2data.py +++ b/masque/utils/ports2data.py @@ -57,8 +57,9 @@ def data_to_ports( # LazyLibrary protects against library[ref.target] causing a circular lookup. # For others, maybe check for cycles up front? TODO name: Optional[str] = None, # Note: name optional, but arg order different from read(postprocess=) - max_depth: int = 999_999, + max_depth: int = 0, skip_subcells: bool = True, + # TODO missing ok? ) -> Pattern: """ # TODO fixup documentation in port_utils