Migrate to flake8.

Fixes bug 1172444

Change-Id: Ieca721663aea2fd31753df4abfb5b01a7145b26a