Fix most flake8 errors

review13751003