MCPcopy Create free account
hub / github.com/SLiCAP/SLiCAP_python / netlist_lines

Method netlist_lines

SLiCAP/schematic/model_item.py:205–217  ·  view source on GitHub ↗

Return .model lines for netlist export; values are auto-wrapped in {}.

(self)

Source from the content-addressed store, hash-verified

203 )
204
205 def netlist_lines(self) -> list:
206 """Return .model lines for netlist export; values are auto-wrapped in {}."""
207 def _wrap(v: str) -> str:
208 v = v.strip()
209 if v and not (v.startswith("{") and v.endswith("}")):
210 return "{" + v + "}"
211 return v
212
213 header = f".model {self.model_name} {self.model_type}"
214 filled = [(n.strip(), _wrap(v)) for n, v in self.params if n.strip()]
215 if filled:
216 return [header] + [f"+ {n}={v}" for n, v in filled]
217 return [header]

Callers 1

build_netlistFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected