Revised using PyLint as a guide.