Migrate to flake8.

Fixes bug 1172444.

Change-Id: Icd6c41f9f5b799ed0b121dc3a3af9d4304fa0eff