Fixing pylint errors

Discovered in #10661