CFY-1187 flake8 fixes