udapi-python
udapi-python copied to clipboard
Allow mention.cluster = another_cluster
Moving a mention from one cluster to another cluster is not supported yet (but it seems @dan-zeman would like to use it). We should:
- remove the
NotImplementedErrorin the setter - add
self._cluster._mentions.remove(self) - decide if
cluster._mentionsshould be always sorted (and if yes, add asort()) if self._bridging and new_cluster in self._bridging.targets: raise ValueError("Bridge cannot self-reference the same cluster")- make sure there are no other hidden problems