pyblish / pyblish-base

Pyblish base library - see https://github.com/pyblish/pyblish for details.
Other
127 stars 59 forks source link

Fix restore state of duplicate plugin test. #333

Closed tokejepsen closed 6 years ago

tokejepsen commented 6 years ago

Pretty sure we meant for the state of duplicate plugins to be restored to False.

mottosso commented 6 years ago

True or False doesn't matter, it's only the existence of this variable that matters. I shouldn't have used True as an example, I can see how that made things confusing. It's the variable that's saying "Yes, allow duplicates". If it isn't saying it, then duplicates aren't allowed.

So in this case, it is confusing because now the variable exists, but its value is "False". Does that mean duplicates are allowed, or not? :)

To my mind, the value can only be positive, but maybe it's a better option to make it "Yes" or "1" or anything that doesn't imply to the user that he can or should set it to anything specific.

tokejepsen commented 6 years ago

Does that mean duplicates are allowed, or not?

It would mean that the duplicates aren't allowed.

Are you confusing the environment variable with the actual boolean variable? https://github.com/pyblish/pyblish-base/blob/5f2661097dfb7c4a6dffa20e5d251b4d5beeb660/pyblish/plugin.py#L48-L52

mottosso commented 6 years ago

Ah, yes. Sorry, you're right. But in that case, how come the tests still pass when you change this value? :O

mottosso commented 6 years ago

Ok, I see what's going on. Should have paid more attention. :) This looks good.

tokejepsen commented 6 years ago

Would this require a release?

mottosso commented 6 years ago

No, don't think so.​