I'd rather that the return was (errors, warnings) rather than a dictionary since you are putting it directly into two lists. That will then be much clearer when others come across this code.