Rename a pin while preserving its connections and properties
(self, pin, new_name)
| 547 | return None |
| 548 | |
| 549 | def rename_pin(self, pin, new_name): |
| 550 | """Rename a pin while preserving its connections and properties""" |
| 551 | if pin.name == new_name: |
| 552 | return # No change needed |
| 553 | |
| 554 | pin.name = new_name |
| 555 | # Update the label text if the pin has a label |
| 556 | if hasattr(pin, 'update_label_text'): |
| 557 | pin.update_label_text() |
| 558 | |
| 559 | def _parse_type_hint(self, hint_node): |
| 560 | if hint_node is None: |
no test coverage detected