Migrate to flake8.

Fixes bug 1172444.

Change-Id: I0d8faa0819738456a28aaf5cc859f510a2b3ed68