Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Check on duplicate validators breaks validators in jupyter notebooks #312
Check on duplicate validators breaks validators in jupyter notebooks if a cell is executed more than once.
The second time the same cell is called.
I was somewhat surprised by this behaviour and when I checked the code, I didn't really get why this exception is raised since we're dealing with a set here, so behaviour shouldn't change.
The test for this behavior demonstrates what it's there to avoid:
If you setup multiple validators with the same name on a class you may get unexpected behaviour when the second validator overwrites the first. The error is there to avoid this behavour.
I often get this myself when I have two similar validators, and create the second by copy and pasting the first and forget to change the function name.
I'll try to fix for jupyter now.