Minor refactoring for simplicity
Adding complexity check to flake8 call