Code now passes flake8