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

Function _checkElementReferences

SLiCAP/SLiCAPyacc.py:705–718  ·  view source on GitHub ↗

Checks if referenced elements exist in the circuit. :param circuitObject: Circuit object to be checked. :type circuitObject: SLiCAP circuit object

(circuitObject)

Source from the content-addressed store, hash-verified

703 _checkReferences(circuitObject.circuits[cir])
704
705def _checkElementReferences(circuitObject):
706 """
707 Checks if referenced elements exist in the circuit.
708
709 :param circuitObject: Circuit object to be checked.
710
711 :type circuitObject: SLiCAP circuit object
712 """
713 elementNames = list(circuitObject.elements.keys())
714 for el in elementNames:
715 for referencedElement in circuitObject.elements[el].refs:
716 if referencedElement not in elementNames:
717 circuitObject.errors += 1
718 print("Error: unknown referenced element: " + referencedElement)
719
720def _checkModelDefs(circuitObject):
721 """

Callers 1

_checkReferencesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected