forked from Warchant/pre-commit-buildifier
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.pre-commit-config.yaml
45 lines (45 loc) · 1.24 KB
/
.pre-commit-config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# install pre-commit:
# poetry install
# install hooks:
# poetry run pre-commit install
# to run manually:
# poetry run pre-commit run
# on all files:
# poetry run pre-commit run --all-files
fail_fast: true
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
types: [python, toml]
- id: trailing-whitespace
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
- id: python-check-mock-methods
- id: python-use-type-annotations
- id: python-no-eval
- repo: local
hooks:
- id: mypy
name: "mypy: checking types"
entry: poetry run mypy --non-interactive --install-types
language: system
types: [python]
- id: pyupgrade
name: "pyupgrade: modernize code"
entry: poetry run pyupgrade --py37-plus
language: system
types: [python]
- id: isort
name: "isort: fixing includes"
entry: poetry run isort --profile black --filter-files
language: system
types: [python]
- id: black
name: "black: format python files"
entry: poetry run black
language: system
types: [python]