Fix pylint errors (#5933) * Fix pylint errors. * Also adjust to https://github.com/ansible/ansible/pull/79909. (cherry picked from commit b1d9507cd2)
b1d9507cd2