fix notestests
fix flake8