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