[Core] Be pep8 compliant, remove variable assign but not used, useles

Improve the quality of the code, we can also try with pylint on another ticket.