|
1 | 1 | repos: |
2 | | - - repo: https://gitlab.com/vojko.pribudic.foss/pre-commit-update |
| 2 | +- repo: https://gitlab.com/vojko.pribudic.foss/pre-commit-update |
3 | 3 | rev: v0.9.0 |
4 | 4 | hooks: |
5 | 5 | # Update pre-commit scripts |
6 | | - - id: pre-commit-update |
| 6 | + - id: pre-commit-update |
7 | 7 |
|
8 | | - - repo: https://github.com/astral-sh/uv-pre-commit |
9 | | - rev: 0.9.13 |
| 8 | +- repo: https://github.com/astral-sh/uv-pre-commit |
| 9 | + rev: 0.9.16 |
10 | 10 | hooks: |
11 | 11 | # Update the uv lockfile |
12 | | - - id: uv-lock |
| 12 | + - id: uv-lock |
13 | 13 |
|
14 | | - - repo: https://github.com/asottile/pyupgrade |
| 14 | +- repo: https://github.com/asottile/pyupgrade |
15 | 15 | rev: v3.21.2 |
16 | 16 | hooks: |
17 | 17 | # Upgrade syntax for newer versions of the language |
18 | | - - id: pyupgrade |
| 18 | + - id: pyupgrade |
19 | 19 | args: [--py312-plus] |
20 | 20 |
|
21 | | - - repo: https://github.com/pre-commit/pre-commit-hooks |
| 21 | +- repo: https://github.com/pre-commit/pre-commit-hooks |
22 | 22 | rev: v6.0.0 |
23 | 23 | hooks: |
24 | 24 | # Prevent giant files from being committed |
25 | | - - id: check-added-large-files |
| 25 | + - id: check-added-large-files |
26 | 26 | # Check whether files parse as valid python |
27 | | - - id: check-ast |
| 27 | + - id: check-ast |
28 | 28 | # Require literal syntax for empty or zero Python builtin types |
29 | | - - id: check-builtin-literals |
| 29 | + - id: check-builtin-literals |
30 | 30 | # Check for files with conflict on a case-insensitive filesystem |
31 | | - - id: check-case-conflict |
| 31 | + - id: check-case-conflict |
32 | 32 | # Checks that non-binary executables have a proper shebang |
33 | | - - id: check-executables-have-shebangs |
| 33 | + - id: check-executables-have-shebangs |
34 | 34 | # Check for files that cannot be created on Windows |
35 | | - - id: check-illegal-windows-names |
| 35 | + - id: check-illegal-windows-names |
36 | 36 | # Attempts to load all json files to verify syntax |
37 | | - - id: check-json |
| 37 | + - id: check-json |
38 | 38 | # Checks that scripts with shebangs are executable |
39 | | - - id: check-shebang-scripts-are-executable |
| 39 | + - id: check-shebang-scripts-are-executable |
40 | 40 | # Checks for symlinks which do not point to anything |
41 | | - - id: check-symlinks |
| 41 | + - id: check-symlinks |
42 | 42 | # Attempts to load all TOML files to verify syntax |
43 | | - - id: check-toml |
| 43 | + - id: check-toml |
44 | 44 | # Attempts to load all yaml files to verify syntax |
45 | | - - id: check-yaml |
| 45 | + - id: check-yaml |
46 | 46 | # Makes sure files end in a newline and only a newline |
47 | | - - id: end-of-file-fixer |
| 47 | + - id: end-of-file-fixer |
48 | 48 | # Removes UTF-8 byte order marker |
49 | | - - id: fix-byte-order-marker |
| 49 | + - id: fix-byte-order-marker |
50 | 50 | # Replaces or checks mixed line ending |
51 | | - - id: mixed-line-ending |
| 51 | + - id: mixed-line-ending |
52 | 52 | # Verifies that test files are named correctly |
53 | | - - id: name-tests-test |
| 53 | + - id: name-tests-test |
54 | 54 | args: [--pytest-test-first] |
55 | 55 | # Protect specific branches from direct checkins |
56 | | - - id: no-commit-to-branch |
| 56 | + - id: no-commit-to-branch |
57 | 57 | args: [-b, dev] |
58 | 58 | # Trims trailing whitespace |
59 | | - - id: trailing-whitespace |
| 59 | + - id: trailing-whitespace |
60 | 60 |
|
61 | | - - repo: https://github.com/adrienverge/yamllint.git |
| 61 | +- repo: https://github.com/adrienverge/yamllint.git |
62 | 62 | rev: v1.37.1 |
63 | 63 | hooks: |
64 | 64 | # Lint YAML files |
65 | | - - id: yamllint |
| 65 | + - id: yamllint |
66 | 66 |
|
67 | | - - repo: https://github.com/astral-sh/ruff-pre-commit |
68 | | - rev: v0.14.7 |
| 67 | +- repo: https://github.com/astral-sh/ruff-pre-commit |
| 68 | + rev: v0.14.8 |
69 | 69 | hooks: |
70 | 70 | # Run the linter |
71 | | - - id: ruff-check |
| 71 | + - id: ruff-check |
72 | 72 | args: [--fix, --show-fixes, --exit-non-zero-on-fix] |
73 | 73 | # Run the formatter |
74 | | - - id: ruff-format |
| 74 | + - id: ruff-format |
75 | 75 |
|
76 | 76 | # local hook used to avoid repeating dependencies list |
77 | | - - repo: local |
| 77 | +- repo: local |
78 | 78 | hooks: |
79 | 79 | # Check type annotations |
80 | | - - id: mypy |
| 80 | + - id: mypy |
81 | 81 | name: mypy |
82 | 82 | entry: mypy |
83 | 83 | require_serial: true |
84 | 84 | language: system |
85 | 85 | 'types_or': [python, pyi] |
86 | 86 |
|
87 | | - - repo: https://github.com/fpgmaas/deptry.git |
| 87 | +- repo: https://github.com/fpgmaas/deptry.git |
88 | 88 | rev: 0.24.0 |
89 | 89 | hooks: |
90 | 90 | # Check for problems in dependency declarations |
91 | | - - id: deptry |
| 91 | + - id: deptry |
92 | 92 | args: ["src"] |
93 | 93 |
|
94 | | - - repo: https://github.com/codespell-project/codespell |
| 94 | +- repo: https://github.com/codespell-project/codespell |
95 | 95 | rev: v2.4.1 |
96 | 96 | hooks: |
97 | 97 | # Fix common misspellings in text files |
98 | | - - id: codespell |
| 98 | + - id: codespell |
99 | 99 | additional_dependencies: |
100 | | - - tomli |
| 100 | + - tomli |
101 | 101 |
|
102 | | - - repo: https://github.com/jendrikseipp/vulture |
| 102 | +- repo: https://github.com/jendrikseipp/vulture |
103 | 103 | rev: v2.14 |
104 | 104 | hooks: |
105 | 105 | # Finds unused code |
106 | | - - id: vulture |
| 106 | + - id: vulture |
107 | 107 |
|
108 | | - - repo: https://github.com/pappasam/toml-sort |
| 108 | +- repo: https://github.com/pappasam/toml-sort |
109 | 109 | rev: v0.24.3 |
110 | 110 | hooks: |
111 | 111 | # Sort and format toml files |
112 | | - - id: toml-sort |
| 112 | + - id: toml-sort |
113 | 113 | args: ["pyproject.toml"] |
0 commit comments