Merge pull request #2967 from dgreen-arm/backport-2.16-fix-pylint-warnings

Backport 2.16: Fix some pylint warnings