Add flake8 settings to setup.cfg and fix flake errors