1repos:
2 - repo: https://github.com/pre-commit/mirrors-mypy
3 rev: 'v1.3.0'
4 hooks:
5 - id: mypy
6 args: ["--config-file=mypy.ini", "--no-site-packages"]
7
8 - repo: https://github.com/psf/black
9 rev: 22.8.0
10 hooks:
11 - id: black
12 args: [--line-length=100, --exclude=""]
13
14 # this is not technically always safe but usually is
15 # use comments `# isort: off` and `# isort: on` to disable/re-enable isort
16 - repo: https://github.com/pycqa/isort
17 rev: 5.12.0
18 hooks:
19 - id: isort
20 args: [--line-length=100, --profile=black]
21
22 # this is slightly dangerous because python imports have side effects
23 # and this tool removes unused imports, which may be providing
24 # necessary side effects for the code to run
25 - repo: https://github.com/PyCQA/autoflake
26 rev: v1.6.1
27 hooks:
28 - id: autoflake
29 args:
30 - "--in-place"
31 - "--expand-star-imports"
32 - "--remove-duplicate-keys"
33 - "--remove-unused-variables"
34 - "--remove-all-unused-imports"
35 exclude: "evals/__init__.py"
36
37 # This allows ruff to run and autofix the code
38 # The line length is so high because some of the evals are very long
39 # TODO: fix the evals and then reduce the line length here
40 - repo: https://github.com/astral-sh/ruff-pre-commit
41 rev: v0.0.277
42 hooks:
43 - id: ruff
44 args: [--fix, --exit-non-zero-on-fix, --line-length=767]
1repos:
2 - repo: https://github.com/pre-commit/mirrors-mypy
3 rev: 'v1.3.0'
4 hooks:
5 - id: mypy
6 args: ["--config-file=mypy.ini", "--no-site-packages"]
7
8 - repo: https://github.com/psf/black
9 rev: 22.8.0
10 hooks:
11 - id: black
12 args: [--line-length=100, --exclude=""]
13
14 # this is not technically always safe but usually is
15 # use comments `# isort: off` and `# isort: on` to disable/re-enable isort
16 - repo: https://github.com/pycqa/isort
17 rev: 5.12.0
18 hooks:
19 - id: isort
20 args: [--line-length=100, --profile=black]
21
22 # this is slightly dangerous because python imports have side effects
23 # and this tool removes unused imports, which may be providing
24 # necessary side effects for the code to run
25 - repo: https://github.com/PyCQA/autoflake
26 rev: v1.6.1
27 hooks:
28 - id: autoflake
29 args:
30 - "--in-place"
31 - "--expand-star-imports"
32 - "--remove-duplicate-keys"
33 - "--remove-unused-variables"
34 - "--remove-all-unused-imports"
35 exclude: "evals/__init__.py"
36
37 # This allows ruff to run and autofix the code
38 # The line length is so high because some of the evals are very long
39 # TODO: fix the evals and then reduce the line length here
40 - repo: https://github.com/astral-sh/ruff-pre-commit
41 rev: v0.0.277
42 hooks:
43 - id: ruff
44 args: [--fix, --exit-non-zero-on-fix, --line-length=767]