-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
111 lines (101 loc) · 2.97 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# 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: v4.1.0
hooks:
- id: check-ast
- id: check-case-conflict
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
exclude: (copier\-answers\.yml|ipynb|html)$
- id: requirements-txt-fixer
- id: trailing-whitespace
args:
- --markdown-linebreak-ext=md
- repo: https://github.com/commitizen-tools/commitizen
rev: v2.23.0
hooks:
- id: commitizen
stages: [commit-msg]
- repo: https://github.com/roy-ht/pre-commit-jupyter
rev: v1.2.1
hooks:
- id: jupyter-notebook-cleanup
args:
# - --remove-kernel-metadata
- --pin-patterns
- "[pin];[donotremove]"
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
name: black
description: A formatter for Python files
files: \.py$
- repo: https://github.com/pycqa/isort
rev: 5.10.1
hooks:
- id: isort
name: isort
description: isort your imports, so you don't have to.
files: \.py$
- repo: https://gitlab.com/pycqa/flake8
rev: 3.9.2
hooks:
- id: flake8
name: flake8
description: Your Tool For Style Guide Enforcement
additional_dependencies:
[
flake8-docstrings==1.6.0,
pydocstyle==6.1.1,
pep8-naming==0.13.0,
darglint==1.8.1,
]
files: \.py$
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.942
hooks:
- id: mypy
name: mypy
description: Optional Static Typing for Python
files: \.py$
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.3.1
hooks:
- id: nbqa-black
additional_dependencies: [black==22.3.0]
args: [--nbqa-mutate]
- id: nbqa-isort
additional_dependencies: [isort==5.7.0]
args: [--nbqa-mutate]
- id: nbqa-check-ast
additional_dependencies: [pre-commit-hooks]
args: [--nbqa-mutate]
- repo: https://github.com/hakancelik96/unimport
rev: 0.9.5
hooks:
- id: unimport
name: unimport
description: A linter, formatter for finding and removing unused import statements
args: [--ignore-init, --include-star-import, --remove]
- repo: local
hooks:
- id: generate_json_schema
stages: [commit]
name: generate_json_schema
language: system
description: Generate the json schema for the `aim.yml` file
entry: python scripts/generate_json_schema.py
always_run: true
pass_filenames: false
# TODO: include poetry hook if it is out of beta
# - repo: https://github.com/python-poetry/poetry
# rev: 1.2.0b1
# hooks:
# - id: poetry-check
# entry: poetry check
# - id: poetry-lock
# name: poetry-lock