Fix pre-commit config & add Black to the pre-commmit hooks

Fixes #2502
This commit is contained in:
Bruno Alla 2020-05-01 19:10:42 +01:00
parent 03be4dad48
commit e37627c4b1

View File

@ -3,18 +3,22 @@ default_stages: [commit]
fail_fast: true fail_fast: true
repos: repos:
- repo: https://github.com/pre-commit/pre-commit-hooks - repo: https://github.com/pre-commit/pre-commit-hooks
rev: master rev: master
hooks: hooks:
- id: trailing-whitespace - id: trailing-whitespace
files: (^|/).+\.(py|html|sh|css|js)$ - id: end-of-file-fixer
- id: check-yaml
- repo: local - repo: https://github.com/psf/black
rev: 19.10b0
hooks:
- id: black
- repo: https://gitlab.com/pycqa/flake8
rev: 3.7.9
hooks: hooks:
- id: flake8 - id: flake8
name: flake8
entry: flake8
language: python
types: [python]
args: ['--config=setup.cfg'] args: ['--config=setup.cfg']
additional_dependencies: [flake8-isort]