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

Method _current_value

SLiCAP/schematic/attribute_dialog.py:56–68  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

54 # ── value plumbing ──────────────────────────────────────────────────────────
55
56 def _current_value(self) -> str:
57 k = self._key
58 if k == "refdes":
59 return self._item.instance_id
60 if k == "model":
61 return self._item.model
62 if k.startswith("ref "):
63 try:
64 idx = int(k.split()[1]) - 1
65 return self._item.refs[idx] if idx < len(self._item.refs) else ""
66 except (ValueError, IndexError):
67 return ""
68 return strip_braces(self._item.params.get(k, ""))
69
70 def apply(self) -> None:
71 text = self._edit.text().strip()

Callers 1

__init__Method · 0.95

Calls 1

strip_bracesFunction · 0.85

Tested by

no test coverage detected