forked from thu-ml/tianshou
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
52 lines (52 loc) · 1.43 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
default_install_hook_types: [commit-msg, pre-commit]
default_stages: [commit, manual]
fail_fast: false
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-added-large-files
- repo: local
hooks:
- id: ruff
name: ruff
entry: poetry run ruff
require_serial: true
language: system
types: [python]
- id: ruff-nb
name: ruff-nb
entry: poetry run nbqa ruff .
require_serial: true
language: system
pass_filenames: false
types: [python]
- id: black
name: black
entry: poetry run black
require_serial: true
language: system
types: [python]
- id: poetry-check
name: poetry check
entry: poetry check
language: system
files: pyproject.toml
pass_filenames: false
- id: poetry-lock-check
name: poetry lock check
entry: poetry check
args: [--lock]
language: system
pass_filenames: false
- id: mypy
name: mypy
entry: poetry run mypy tianshou examples test
# filenames should not be passed as they would collide with the config in pyproject.toml
pass_filenames: false
files: '^tianshou(/[^/]*)*/[^/]*\.py$'
language: system
- id: mypy-nb
name: mypy-nb
entry: poetry run nbqa mypy
language: system