integrate flake8 into .gitlab-ci.yaml and fix found errors

7 jobs for master
in 8 minutes and 25 seconds and was queued for 2 seconds