Incidental to this PR there should be two spaces before the # for flake8. Is it worth fixing here or in a separate PR addressing comments?