Update pre-commit and add new hooks (#7781)

* update precommit

* Update .pre-commit-config.yaml

Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>

* Apply suggestions from code review

Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>

Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
This commit is contained in:
Jirka Borovec 2021-06-01 07:43:50 +02:00 committed by GitHub
parent 0dd6d3a798
commit 0b6fd1da54
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 3 deletions

View File

@ -19,17 +19,28 @@ repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-yaml
- id: check-docstring-first
- id: check-executables-have-shebangs
- id: check-toml
- repo: https://github.com/PyCQA/isort
rev: 5.8.0
hooks:
- id: isort
args: [--settings-path, ./pyproject.toml]
name: Format imports
- repo: https://github.com/pre-commit/mirrors-yapf
rev: v0.31.0
hooks:
- id: yapf
args: [--parallel, --in-place]
name: Format code
language: python
- repo: https://github.com/PyCQA/flake8
rev: 3.9.2
hooks:
- id: flake8
name: Check PEP8