Coding Conventions: Setup pre-commit and add configuration

Setup pre-commit to run at least flake8 and black before commit.

Edited by Ernesto Rico Schmidt