Fix bugs and style issues with pylint
2 files changed