''' Example plugin to extend functionality '''importtypingfromspydrnet.ir.pinimportPinasPinBaseiftyping.TYPE_CHECKING:fromspydrnet.ir.pinimportPinasPinSDNfromspydrnet_physical.ir.elementimportElementPhyPinBase=type("PinBase",(PinSDN,ElementPhy),{})
[docs]classPin(PinBase):''' This class extends the default Pin class '''def_bundle(self):''' Overrides the _bundle method from element class (returns port) '''returnself.port@propertydefis_connected(self):''' Checks if this pin is connected to any wire Checks for the connected wire if not found false '''returnbool(self.wire)