Migrate to flake8.

Fixes bug 1172444.

Change-Id: Iba46d40a0e3ae0385ce51181f47295a2b520110d