Move flake8 code into a seperate shell code.