|
1 | 1 | repos: |
2 | | - # Various general + format-specific helpers |
3 | | - - repo: https://github.com/pre-commit/pre-commit-hooks |
4 | | - rev: v4.4.0 |
5 | | - hooks: |
6 | | - - id: check-symlinks |
7 | | - - id: trailing-whitespace |
8 | | - - id: mixed-line-ending |
9 | | - args: [--fix=lf] |
10 | | - - id: check-yaml |
11 | | - exclude: 'mkdocs.yml' |
12 | | - - id: check-toml |
13 | | - - id: check-json |
14 | | - - id: check-ast |
15 | | - - id: debug-statements |
16 | | - - id: check-merge-conflict |
17 | | - - id: check-shebang-scripts-are-executable |
18 | | - - id: check-added-large-files |
19 | | - args: [--maxkb=10000] |
20 | | - - repo: https://github.com/python-jsonschema/check-jsonschema |
21 | | - rev: '0.22.0' |
22 | | - hooks: |
23 | | - - id: check-github-workflows |
24 | | - - repo: https://github.com/pycqa/isort |
25 | | - rev: '5.12.0' |
26 | | - hooks: |
27 | | - - id: isort |
28 | | - args: ['--profile', 'black'] |
29 | | - - repo: https://github.com/ambv/black |
30 | | - rev: '23.1.0' |
31 | | - hooks: |
32 | | - - id: black |
33 | | - - repo: https://github.com/PyCQA/autoflake |
34 | | - rev: v2.1.1 |
35 | | - hooks: |
36 | | - - id: autoflake |
| 2 | + # Various general + format-specific helpers |
| 3 | + - repo: https://github.com/pre-commit/pre-commit-hooks |
| 4 | + rev: v4.4.0 |
| 5 | + hooks: |
| 6 | + - id: check-symlinks |
| 7 | + - id: trailing-whitespace |
| 8 | + - id: mixed-line-ending |
| 9 | + args: [--fix=lf] |
| 10 | + - id: check-yaml |
| 11 | + exclude: "mkdocs.yml" |
| 12 | + - id: check-toml |
| 13 | + - id: check-json |
| 14 | + - id: check-ast |
| 15 | + - id: debug-statements |
| 16 | + - id: check-merge-conflict |
| 17 | + - id: check-shebang-scripts-are-executable |
| 18 | + - id: check-added-large-files |
| 19 | + args: [--maxkb=10000] |
| 20 | + - repo: https://github.com/python-jsonschema/check-jsonschema |
| 21 | + rev: "0.22.0" |
| 22 | + hooks: |
| 23 | + - id: check-github-workflows |
| 24 | + - repo: https://github.com/astral-sh/ruff-pre-commit |
| 25 | + # Ruff version. |
| 26 | + rev: v0.1.6 |
| 27 | + hooks: |
| 28 | + # Run the linter. |
| 29 | + - id: ruff |
| 30 | + types_or: [python, pyi, jupyter] |
| 31 | + args: [--fix] |
| 32 | + # Run the formatter. |
| 33 | + - id: ruff-format |
| 34 | + types_or: [python, pyi, jupyter] |
| 35 | + - repo: https://github.com/pre-commit/mirrors-mypy |
| 36 | + rev: "v1.1.1" |
| 37 | + hooks: |
| 38 | + - id: mypy |
| 39 | + args: [--no-strict-optional, --ignore-missing-imports] |
| 40 | + # NOTE: you might need to add some deps here: |
| 41 | + additional_dependencies: [] |
37 | 42 |
|
38 | | - # Quality |
39 | | - - repo: https://github.com/pycqa/flake8 |
40 | | - rev: '6.0.0' |
41 | | - hooks: |
42 | | - - id: flake8 |
43 | | - additional_dependencies: |
44 | | - - Flake8-pyproject==1.2.3 |
45 | | - - flake8-bugbear==23.3.23 |
46 | | - - dlint==0.14.1 |
47 | | - - repo: https://github.com/pycqa/pydocstyle |
48 | | - rev: '6.3.0' |
49 | | - hooks: |
50 | | - - id: pydocstyle |
51 | | - additional_dependencies: ['tomli==2.0.1'] |
52 | | - files: '^src/' |
53 | | - - repo: https://github.com/pre-commit/mirrors-mypy |
54 | | - rev: 'v1.1.1' |
55 | | - hooks: |
56 | | - - id: mypy |
57 | | - args: [--no-strict-optional, --ignore-missing-imports] |
58 | | - # NOTE: you might need to add some deps here: |
59 | | - additional_dependencies: [] |
60 | | - - repo: https://github.com/PyCQA/bandit |
61 | | - rev: '1.7.5' |
62 | | - hooks: |
63 | | - - id: bandit |
64 | | - args: ['-q', '-c', 'pyproject.toml'] |
65 | | - additional_dependencies: ['.[toml]'] |
| 43 | + # Metadata |
| 44 | + - repo: https://github.com/citation-file-format/cff-converter-python |
| 45 | + rev: "44e8fc9" |
| 46 | + hooks: |
| 47 | + - id: validate-cff |
| 48 | + - repo: https://github.com/fsfe/reuse-tool |
| 49 | + rev: "v1.1.2" |
| 50 | + hooks: |
| 51 | + - id: reuse |
66 | 52 |
|
67 | | - # Metadata |
68 | | - - repo: https://github.com/citation-file-format/cff-converter-python |
69 | | - rev: '44e8fc9' |
70 | | - hooks: |
71 | | - - id: validate-cff |
72 | | - - repo: https://github.com/fsfe/reuse-tool |
73 | | - rev: 'v1.1.2' |
74 | | - hooks: |
75 | | - - id: reuse |
| 53 | + - repo: local |
| 54 | + hooks: |
| 55 | + # NOTE: copy from .pre-commit-hooks.yaml, for technical reasons |
| 56 | + - id: somesy-sync |
| 57 | + name: Run somesy sync |
| 58 | + entry: somesy sync |
| 59 | + language: python |
| 60 | + files: '^\.somesy\.toml|pyproject\.toml$' |
| 61 | + pass_filenames: false |
76 | 62 |
|
77 | | - - repo: local |
78 | | - hooks: |
79 | | - # NOTE: copy from .pre-commit-hooks.yaml, for technical reasons |
80 | | - - id: somesy-sync |
81 | | - name: Run somesy sync |
82 | | - entry: somesy sync |
83 | | - language: python |
84 | | - files: '^\.somesy\.toml|pyproject\.toml$' |
85 | | - pass_filenames: false |
86 | | - |
87 | | - - id: somesy-fill |
88 | | - name: Update AUTHORS.md |
89 | | - entry: somesy fill -t docs/_template_authors.md -o AUTHORS.md |
90 | | - language: python |
91 | | - files: '^\.somesy\.toml|pyproject\.toml$' |
92 | | - pass_filenames: false |
| 63 | + - id: somesy-fill |
| 64 | + name: Update AUTHORS.md |
| 65 | + entry: somesy fill -t docs/_template_authors.md -o AUTHORS.md |
| 66 | + language: python |
| 67 | + files: '^\.somesy\.toml|pyproject\.toml$' |
| 68 | + pass_filenames: false |
0 commit comments