It's `log.warning` not `log.warnings`
Fix indentation, a bad variable and some formatting.
Fix indentation and some minor formatting.
Merge pull request #7486 from s0undt3ch/hotfix/lint

Lint, indentation, minor formatting fixes