diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4b54565a..645d14e2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -61,6 +61,6 @@ repos: additional_dependencies: - tomli - repo: https://github.com/astral-sh/uv-pre-commit - rev: 0.5.11 + rev: 0.5.13 hooks: - id: uv-lock diff --git a/gplugins/klayout/netlist_spice_reader.py b/gplugins/klayout/netlist_spice_reader.py index 41620647..79a6a84b 100644 --- a/gplugins/klayout/netlist_spice_reader.py +++ b/gplugins/klayout/netlist_spice_reader.py @@ -54,7 +54,9 @@ def wants_subcircuit(self, name: str): @override def parse_element(self, s: str, element: str) -> kdb.ParseElementData: # Allow Calibre-style model name given as `$[model_name]` by removing the brackets - s = re.sub(r"\$\[([^\]]+)\]", r"\1", s) + # This is used for resistors and capacitors + if element != "X": + s = re.sub(r"\$\[([^\]]+)\]", r"\1", s) x_value, y_value = None, None if "$" in s: diff --git a/pyproject.toml b/pyproject.toml index 192d5bce..acb35433 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -84,7 +84,7 @@ klayout = [ "vlsirtools" ] luminescent = [ - "luminescent~=0.2.12", + "luminescent>=0.2.12,<0.4.0", "sortedcontainers" ] maintainer = [