diff options
author | Thanh Ha <zxiiro@gmail.com> | 2019-08-23 09:13:35 -0400 |
---|---|---|
committer | Sorin Sbarnea <ssbarnea@redhat.com> | 2019-09-09 18:24:34 +0000 |
commit | fc63f1439816d9022a2d538614b0b7592f96b454 (patch) | |
tree | 319d30b8f50fd36c4be028f0ff74c22d3a7d0cc3 | |
parent | 4d90c187a945c04b9949d5ee7738a049dd634897 (diff) | |
download | python-jenkins-job-builder-fc63f1439816d9022a2d538614b0b7592f96b454.tar.gz python-jenkins-job-builder-fc63f1439816d9022a2d538614b0b7592f96b454.tar.xz python-jenkins-job-builder-fc63f1439816d9022a2d538614b0b7592f96b454.zip |
Setup python-black for auto code style fmt
Instead of having our reviewers spend time and effort commenting on
code style in changes let's make the process more automated by using
an opinionated tool like python-black.
Change-Id: Ia2724a0b38381a2ef1860c3fcd9d44bb51b8ddbb
Signed-off-by: Thanh Ha <zxiiro@gmail.com>
-rw-r--r-- | .pre-commit-config.yaml | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9d14a143..2780448f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,14 +1,24 @@ # See https://pre-commit.com for more information # See https://pre-commit.com/hooks.html for more hooks repos: -- repo: https://github.com/pre-commit/pre-commit-hooks - rev: v2.0.0 + - repo: https://github.com/python/black.git + rev: 19.3b0 hooks: - - id: check-added-large-files - - id: end-of-file-fixer - - id: flake8 + - id: black + language_version: python3 + - repo: https://github.com/pre-commit/pre-commit-hooks.git + rev: v2.2.3 + hooks: + - id: check-added-large-files + - id: end-of-file-fixer + - id: trailing-whitespace + - repo: https://gitlab.com/pycqa/flake8.git + rev: 3.7.8 + hooks: + - id: flake8 args: ['--config=setup.cfg'] - language: python types: [python] - additional_dependencies: [flake8>=3.6.0] - - id: trailing-whitespace + additional_dependencies: + - flake8>=3.7.8 + - flake8-black + language_version: python3 |