pix py2 import, flake8 fixes