flake8 fixes to core files
Merge pull request #2290 from ximenesuk/flake8-fixes-core-dev

Integration tests - flake8 fixes to core files (rebased)