Migrate to flake8.

Fixes bug 1172444

Change-Id: I09e1e2d03f41a175aa39760b5fc560ed0d9d30a5