Typehint to setCustomMessages.
Merge pull request #1039 from coolhome/proposal-3

[MINOR] Type hint to setCustomMessages.