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

Function _pairReferences

SLiCAP/SLiCAPexecute.py:1285–1299  ·  view source on GitHub ↗

Removes the pair extension from the list with referenced circuit elements.

(refs, pairExt, convType)

Source from the content-addressed store, hash-verified

1283 return instr
1284
1285def _pairReferences(refs, pairExt, convType):
1286 """
1287 Removes the pair extension from the list with referenced circuit elements.
1288 """
1289 lenExt = len(pairExt[0])
1290 for i in range(len(refs)):
1291 if len(refs[i]) > lenExt and refs[i][-lenExt:] in pairExt:
1292 ref = refs[i][:-lenExt]
1293 if convType == 'dd' or convType == 'dc':
1294 ref += '_D'
1295 elif convType == 'cc'or convType == 'cd':
1296 ref += '_C'
1297 refs[i] = ref
1298 refs = list(set(refs))
1299 return refs
1300
1301def _convertMatrices(instr):
1302 """

Callers 1

_convertMatricesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected