Update to NOQA for flake8
Use more consistent virtualenv detection