Comply with PEP8 using flake8 and git pre-commit hooks. It will take just a minute.
Go the base location of your source code and activate your virtualenv if any.
$ pip install flake8 # install flake8
If you are using git, create a pre-commit hook file
$ vim .git/hooks/pre-commit
In the file add the below two lines
Now as you try to commit your code it will show you all coding style issues.
You will only be able to commit until code is pep8 compliant.