Closed InnocentBug closed 1 year ago
I also have false positive file changes, that black detected in the CodeBase.
We should really have an auto-formatter for this repo to avoid this.
Here it was black.
We could setup a pre-commit bot. Or even, better, I recommend trunk.io.
Trunk is free for open-source, and I could set it up for us if desired.
A common situation for my developing with the SDK that, I don't know if a node exists or not.
For example, a script that adds a Material to a collection, might create the collection first, but with the second material that the
Collection
node exists already. Or citing a paper, a different user might have added the reference already.For these situations it would be nice to catch the exception and fetch the existing node instead. (Or course, this has to be used with a bit of care to not overwrite or use false duplicate nodes.)
So this would be ideal:
This requires that the
UniqueNodeError
transparently makes the found url accessible. In this PR, I simply parse the URL from the message and make it available.As a precaution for changing message, I issue warnings if no such URL can be found.