Fix errors reported by PyLint