use flake8, it will tell you how to fix it.