File size: 1,919 Bytes
d40299b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
repos:
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c  # frozen: v6.0.0
    hooks:
      - id: check-toml
      - id: check-yaml
      - id: end-of-file-fixer
      - id: mixed-line-ending
      - id: trailing-whitespace

  - repo: https://github.com/astral-sh/ruff-pre-commit
    rev: 745be0411e3c150e246d527e531e5a221b8c3462  # frozen: v0.15.19
    hooks:
      - id: ruff-check
        args: [ --fix ]
      - id: ruff-format

  - repo: https://github.com/pre-commit/pygrep-hooks
    rev: 3a6eb0fadf60b3cccfd80bad9dbb6fae7e47b316  # frozen: v1.10.0
    hooks:
    - id: rst-backticks
    - id: rst-directive-colons
    - id: rst-inline-touching-normal

  - repo: https://github.com/pre-commit/mirrors-mypy
    rev: d2823d321df3af8f878f7ee3414dc94d037145b9  # frozen: v2.1.0
    hooks:
      - id: mypy
        exclude: '^(docs)'
        args: []
        additional_dependencies: &type_deps
          - hypothesis
          - nox
          - 'pytest<9'
          - tomli
          - tomli_w
          - 'typing_extensions>=4.15.0'
          - httpx

  - repo: https://github.com/crate-ci/typos
    rev: 37bb98842b0d8c4ffebdb75301a13db0267cef89  # frozen: v1.47.2
    hooks:
      - id: typos
        args: []

  - repo: https://github.com/zizmorcore/zizmor-pre-commit
    rev: e3eebf65325ccc992422292cb7a4baee967cf815  # frozen: v1.26.1
    hooks:
      - id: zizmor
        files: "^\\.github"
        args: [--persona=auditor]

  - repo: https://github.com/rhysd/actionlint
    rev: 914e7df21a07ef503a81201c76d2b11c789d3fca  # frozen: v1.7.12
    hooks:
      - id: actionlint

  - repo: local
    hooks:
      - id: check-frozen-revs
        name: Check frozen pre-commit revs match tags
        entry: python tasks/check_frozen_revs.py
        language: python
        files: ^\.pre-commit-config\.yaml$
        additional_dependencies: ['ruamel.yaml']