CFY-1230 flake8 fixes