Fix most flake8 errors

review14741002