MCPcopy Index your code
hub / github.com/SLiCAP/SLiCAP_python / _attr

Function _attr

SLiCAP/schematic/component_item.py:105–107  ·  view source on GitHub ↗
(attrs: str, name: str, default: float)

Source from the content-addressed store, hash-verified

103 return default
104
105 def _attr(attrs: str, name: str, default: float) -> float:
106 m = re.search(rf'{name}\s*=\s*"([^"]*)"', attrs)
107 return _num(m.group(1), default) if m else default
108
109 def _repl(m):
110 attrs = m.group(1).decode("utf-8", "replace")

Callers 1

_replFunction · 0.85

Calls 2

_numFunction · 0.85
groupMethod · 0.80

Tested by

no test coverage detected