MCPcopy Create free account
hub / github.com/bhowiebkr/PyFlowGraph / remove_pin

Method remove_pin

src/core/node.py:758–778  ·  view source on GitHub ↗
(self, pin_to_remove)

Source from the content-addressed store, hash-verified

756 return self.add_pin(name, direction, pin_type_str, "data")
757
758 def remove_pin(self, pin_to_remove):
759 # Remove connections first
760 if pin_to_remove.connections:
761 for conn in list(pin_to_remove.connections):
762 if self.scene():
763 self.scene().remove_connection(conn, use_command=False)
764
765 # Destroy the pin (this handles scene removal safely)
766 pin_to_remove.destroy()
767
768 # Remove from all pin lists
769 if pin_to_remove in self.pins:
770 self.pins.remove(pin_to_remove)
771 if pin_to_remove in self.input_pins:
772 self.input_pins.remove(pin_to_remove)
773 if pin_to_remove in self.output_pins:
774 self.output_pins.remove(pin_to_remove)
775 if pin_to_remove in self.execution_pins:
776 self.execution_pins.remove(pin_to_remove)
777 if pin_to_remove in self.data_pins:
778 self.data_pins.remove(pin_to_remove)

Callers 2

_update_data_pinsMethod · 0.95
update_pins_from_codeMethod · 0.95

Calls 3

removeMethod · 0.80
remove_connectionMethod · 0.45
destroyMethod · 0.45

Tested by

no test coverage detected