(self, pin_to_remove)
| 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) |
no test coverage detected