I ran the code through a PEP8 checker and fixed most of its complaints. The main thing I ignored was keeping line length below 80, which is just annoying with little advantage.
if you run autopep8 make sure you do autopep8 --in-line --ignore=E402,E501 -a -a so you get aggressive changes but ignore certain things (Import not at top and line too long)
I ran the code through a PEP8 checker and fixed most of its complaints. The main thing I ignored was keeping line length below 80, which is just annoying with little advantage.
Finally, an excuse for my code OCD.