pep8 fix generate.py