-
Notifications
You must be signed in to change notification settings - Fork 1
/
.pre-commit-config.yaml
50 lines (45 loc) · 1.48 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
# 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-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: 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" ]
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
name: "isort"
args: [ "--profile", "black" ]
# latest version of mypy at time pre-commit config is being set up
# NOTE: only checks code in "gflownet/" directory.
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.10.0
hooks:
- id: mypy
name: "mypy"
files: "gflownet/"
args: [ "--install-types", "--non-interactive" ]