Fixed some pylint violations

(cherry picked from commit cfbdcc19337314c0bc8901711ec0e63147e1c3d0)