flake8 fixes

Additionally this change should make moving to /v1.8 slightly less painful