tests: Test complexity and PEP8 using flake8