Fixed bug on tox and added flake8 test