|
1 | 1 | # See https://pre-commit.com for more information
|
2 | 2 | # See https://pre-commit.com/hooks.html for more hooks
|
3 | 3 | repos:
|
4 |
| -# Linting |
5 |
| -- repo: https://github.com/pre-commit/pre-commit-hooks |
6 |
| - rev: v4.4.0 |
7 |
| - hooks: |
8 |
| - - id: check-ast |
9 |
| - - id: trailing-whitespace |
10 |
| - - id: end-of-file-fixer |
11 |
| - exclude_types: [jupyter] |
12 |
| - - id: check-toml |
13 |
| - - id: check-added-large-files |
14 |
| -- repo: https://github.com/psf/black |
15 |
| - rev: 23.9.1 |
16 |
| - hooks: |
17 |
| - - id: black |
18 |
| - - id: black-jupyter |
19 |
| -# Python static analysis |
20 |
| -- repo: https://github.com/charliermarsh/ruff-pre-commit |
21 |
| - # Ruff version. |
22 |
| - rev: 'v0.0.288' |
23 |
| - hooks: |
24 |
| - - id: ruff |
25 |
| -# Shell static analysis |
26 |
| -- repo: https://github.com/koalaman/shellcheck-precommit |
27 |
| - rev: v0.9.0 |
28 |
| - hooks: |
29 |
| - - id: shellcheck |
30 |
| - # precommit invokes shellcheck once per file. shellcheck complains if file |
31 |
| - # includes another file not given on the command line. Ignore this, since |
32 |
| - # they'll just get checked in a separate shellcheck invocation. |
33 |
| - args: ["-e", "SC1091"] |
34 |
| -# Misc |
35 |
| -- repo: https://github.com/codespell-project/codespell |
36 |
| - rev: v2.2.5 |
37 |
| - hooks: |
38 |
| - - id: codespell |
39 |
| - args: ["--skip=*.lock,*.pyc,tests/testdata/*,*.ipynb,*.csv","--ignore-words-list=codebook"] |
40 |
| -# Hooks that run in local environment (not isolated venv) as they need |
41 |
| -# same dependencies as our package. |
42 |
| -- repo: https://github.com/pre-commit/mirrors-mypy |
| 4 | + # Linting |
| 5 | + - repo: https://github.com/pre-commit/pre-commit-hooks |
| 6 | + rev: v4.4.0 |
| 7 | + hooks: |
| 8 | + - id: check-ast |
| 9 | + - id: trailing-whitespace |
| 10 | + - id: end-of-file-fixer |
| 11 | + exclude_types: [jupyter] |
| 12 | + - id: check-toml |
| 13 | + - id: check-added-large-files |
| 14 | + # Python static analysis |
| 15 | + - repo: https://github.com/charliermarsh/ruff-pre-commit |
| 16 | + # Ruff version. |
| 17 | + rev: "v0.0.288" |
| 18 | + hooks: |
| 19 | + - id: ruff |
| 20 | + # Shell static analysis |
| 21 | + - repo: https://github.com/koalaman/shellcheck-precommit |
| 22 | + rev: v0.9.0 |
| 23 | + hooks: |
| 24 | + - id: shellcheck |
| 25 | + # precommit invokes shellcheck once per file. shellcheck complains if file |
| 26 | + # includes another file not given on the command line. Ignore this, since |
| 27 | + # they'll just get checked in a separate shellcheck invocation. |
| 28 | + args: ["-e", "SC1091"] |
| 29 | + # Misc |
| 30 | + - repo: https://github.com/codespell-project/codespell |
| 31 | + rev: v2.2.5 |
| 32 | + hooks: |
| 33 | + - id: codespell |
| 34 | + args: |
| 35 | + [ |
| 36 | + "--skip=*.lock,*.pyc,tests/testdata/*,*.ipynb,*.csv", |
| 37 | + "--ignore-words-list=codebook", |
| 38 | + ] |
| 39 | + # Hooks that run in local environment (not isolated venv) as they need |
| 40 | + # same dependencies as our package. |
| 41 | + - repo: https://github.com/pre-commit/mirrors-mypy |
43 | 42 | rev: v1.5.1
|
44 | 43 | hooks:
|
45 |
| - - id: mypy |
| 44 | + - id: mypy |
46 | 45 | args: [--follow-imports=skip]
|
47 | 46 |
|
48 | 47 | exclude: (mod_model_classes.py|tl_mods.py|run_clm.py)
|
0 commit comments