-
Notifications
You must be signed in to change notification settings - Fork 27
/
.pre-commit-config.yaml
51 lines (49 loc) · 1.38 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
# Configuration for the `pre-commit` tool.
#
# *Note*: To override the check, add the `--no-verify` flag to your
# git command line
#
# To enable the checks' being invoked on `git commit`, run
# ```
# pip3 install pre-commit
# pre-commit install
# ```
#
# To run them manually before committing, type `pre-commit run`
default_language_version:
python: python3.10
repos:
# Data validity and file permissions
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-executables-have-shebangs
- id: check-json
- id: check-merge-conflict
exclude: \.rst$
- id: check-shebang-scripts-are-executable
- id: check-toml
- id: check-yaml
# Formatting consistency
# TODO: can't use main yapf while this issue is open
# https://github.com/google/yapf/issues/1164
#- repo: https://github.com/google/yapf
# rev: v0.40.2
- repo: https://github.com/grananqvist/yapf
rev: 438cb2825b220f2f64c5f5fd045cf378c466e749
hooks:
- id: yapf
args:
- --in-place
# Style checks, common errors, etc.
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.0.290"
hooks:
- id: ruff
# Static analysis for type checking
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.5.0
hooks:
- id: mypy
exclude: ^publications/
# TODO: license header hook