File: .pre-commit-config.yaml

package info (click to toggle)
python-ansible-compat 25.12.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 964 kB
  • sloc: python: 2,638; sh: 26; makefile: 24
file content (114 lines) | stat: -rw-r--r-- 3,059 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
---
ci:
  # We rely on renovate to update it but there is no way to fully disable it
  # https://github.com/pre-commit-ci/issues/issues/83
  autoupdate_schedule: quarterly
  skip:
    # https://github.com/pre-commit-ci/issues/issues/55
    - deps
    - tombi-format
    - tombi-lint
exclude: |
  (?x)^(
    test/assets/.*
  )$
repos:
  - repo: meta
    hooks:
      - id: check-useless-excludes
  - repo: https://github.com/astral-sh/uv-pre-commit
    rev: 0.9.13
    hooks:
      - id: uv-sync
      - id: uv-lock
      - id: uv-lock
        name: "deps: upgrade via uv sync --upgrade"
        alias: deps
        args: ["--upgrade"]
        stages: [manual]
  - repo: https://github.com/biomejs/pre-commit
    rev: "v2.3.8"
    hooks:
      - id: biome-check
        name: biome
        alias: biome
        args: [--unsafe]
  - repo: https://github.com/pre-commit/pre-commit-hooks.git
    rev: v6.0.0
    hooks:
      - id: check-added-large-files
      - id: check-executables-have-shebangs
      - id: check-merge-conflict
      - id: check-merge-conflict
      - id: check-symlinks
      - id: debug-statements
      - id: debug-statements
      - id: detect-private-key
      - id: end-of-file-fixer
      - id: fix-byte-order-marker
      - id: mixed-line-ending
      - id: trailing-whitespace
  - repo: https://github.com/codespell-project/codespell
    rev: v2.4.1
    hooks:
      - id: codespell
  - repo: https://github.com/jsh9/pydoclint
    rev: 0.8.3
    hooks:
      - id: pydoclint
        # This allows automatic reduction of the baseline file when needed.
        entry: sh -ec "pydoclint . && pydoclint --generate-baseline=1 ."
        pass_filenames: false
  - repo: https://github.com/adrienverge/yamllint.git
    rev: v1.37.1
    hooks:
      - id: yamllint
        files: \.(yaml|yml)$
        types: [file, yaml]
        entry: yamllint --strict

  - repo: https://github.com/tombi-toml/tombi-pre-commit
    rev: v0.7.0
    hooks:
      - id: tombi-format
        alias: toml
      - id: tombi-lint
        alias: toml

  - repo: https://github.com/astral-sh/ruff-pre-commit
    rev: v0.14.7
    hooks:
      - id: ruff-format
        alias: ruff
      - id: ruff-check
        alias: ruff

  - repo: https://github.com/pre-commit/mirrors-mypy
    rev: v1.19.0
    hooks:
      - id: mypy
        # empty args needed in order to match mypy cli behavior
        args: ["--strict"]
        additional_dependencies:
          - ansible-core>=2.16.0
          - cached_property
          - packaging
          - pytest
          - pytest-mock
          - subprocess-tee>=0.4.1
          - "typing-extensions>=4.5.0;python_version<'3.10'"
          - types-PyYAML
          - types-setuptools
          - types-jsonschema>=4.4.9
  - repo: https://github.com/pycqa/pylint
    rev: v4.0.3
    hooks:
      - id: pylint
        additional_dependencies:
          - PyYAML
          - pytest
          - typing_extensions
  - repo: https://github.com/ansible/team-devtools
    rev: v25.12.8
    hooks:
      - id: check-platform-constraints