CFY-647 flake8 fixes