make code work for pyflakes and pep8