-
Notifications
You must be signed in to change notification settings - Fork 15
/
.pre-commit-config.yaml
52 lines (48 loc) · 1.6 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
# This should not be necessary, except that `conda<4.11` has a bug dealing with `python>=3.10`
# (see https://github.com/conda/conda/issues/10969), and the below makes that go away.
default_language_version:
python: python3
repos:
# Generally useful pre-commit hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0 # Use the ref you want to point at
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-docstring-first
- id: check-executables-have-shebangs
- id: check-json
- id: check-merge-conflict
- id: check-symlinks
- id: check-toml
- id: check-yaml
- id: debug-statements
- id: destroyed-symlinks
- id: detect-private-key
- id: end-of-file-fixer
- id: name-tests-test
args: ["--pytest-test-first"]
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
# latest version of black when this pre-commit config is being set up
- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black
name: "black"
args: ["--config=pyproject.toml"]
# latest version of mypy at time pre-commit config is being set up
# NOTE: only checks code in "syntheseus" directory.
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.2.0
hooks:
- id: mypy
name: "mypy"
files: "syntheseus/"
args: ["--install-types", "--non-interactive"]
# Latest ruff (does linting + more)
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: 'v0.2.1'
hooks:
- id: ruff
args: [--fix]