Fixes for flake8 and rtd