Add black to pre-commit 44/15144/3
authorThanh Ha <zxiiro@gmail.com>
Sun, 31 Mar 2019 00:48:54 +0000 (20:48 -0400)
committerThanh Ha <zxiiro@gmail.com>
Fri, 24 Jul 2020 13:27:44 +0000 (09:27 -0400)
commit07a5b3249e5a38ce0d8c1b49fe72e24cb246a0a5
tree2a595513ea147358b2d80b28f3c0768ae3a4581a
parent6bedacc14ba49e970d2b4f121ca434abe60e3202
Add black to pre-commit

* Requires Python 3.6 or newer
* Changes pep8 max line length to 88 to match black
* Add .editorconfig to match black config
* Update tox to 2.0 to match black recommended version

This patch uses "black" to automatically manage Python style
conventions so that we don't have to. It utilizes pre-commit
to automatically handle running black on commit so that a
contributor does not have to think about it.

This however means that there is a required install step to
initialize a new dev environment using one of 2 options below:

1) Install pre-commit via your pkg manager then run:

    pre-commit install

2) Use tox to install pre-commit:

    tox -e check-hooks

Change-Id: I527e58b763dc7b0fdfa60fa619c61d2c63356d47
Signed-off-by: Thanh Ha <zxiiro@gmail.com>
.coafile
.editorconfig [new file with mode: 0644]
.pre-commit-config.yaml
tox.ini