FF-Multi-Converter
FF-Multi-Converter copied to clipboard
Simplify utils.add_to_layout() avoiding the use of type checking
Simplify utils.add_to_layout() avoiding the use of type checking and improving performance
Hello there.
I don't understand why you want to replace the isinstance calls by manually checking the class's names. You're trying to do the same thing only in an unreliable and non-standard way.
Also by removing the final else clause that raises the TypeError you assume that the caller passed a proper type. And that is not a good assumption.
Finally, I don't have a strong opinion about passing strings as the first arg to add_to_layout. I reckon that I did it that way in order for the calls to this function to be shorter in length as it is called frequently. Why do you propose that it should be removed and the caller should explicitly pass a layout class?
Thanks.
Do you really want someone to collaborate with this project?
I would be happy to accept patches that improve the source code's quality or implement new functionality.
However, I raised my concerns and questions about your changes and you're not really giving any answers.