Fixed several flake8 errors, including one where a test wouldn't be run