Fix flake8 tests