Please pylint

My patch #18221 yesterday introduced new Pylint warnings/errors.

This fixes these warnings.
Merge pull request #18268 from multani/develop

Please pylint