File: .pre-commit-config.yaml

package info (click to toggle)
python-xarray 2025.10.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 11,652 kB
  • sloc: python: 117,125; makefile: 260; sh: 47
file content (80 lines) | stat: -rw-r--r-- 2,689 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
# https://pre-commit.com/
ci:
  autoupdate_schedule: monthly
  autoupdate_commit_msg: "Update pre-commit hooks"
repos:
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v6.0.0
    hooks:
      - id: trailing-whitespace
      - id: end-of-file-fixer
      - id: check-yaml
      - id: debug-statements
      - id: mixed-line-ending
  - repo: https://github.com/pre-commit/pygrep-hooks
    rev: v1.10.0
    hooks:
      # - id: python-check-blanket-noqa  # checked by ruff
      # - id: python-check-blanket-type-ignore  # checked by ruff
      # - id: python-check-mock-methods  # checked by ruff
      - id: python-no-log-warn
      # - id: python-use-type-annotations  # too many false positives
      - id: rst-backticks
      - id: rst-directive-colons
      - id: rst-inline-touching-normal
      - id: text-unicode-replacement-char
  - repo: https://github.com/astral-sh/ruff-pre-commit
    rev: v0.13.3
    hooks:
      - id: ruff-check
        args: ["--fix", "--show-fixes"]
      - id: ruff-format
  # Disabled: blackdoc v0.4.3 has compatibility issues with Python 3.13
  # Re-enable when blackdoc is updated to support Python 3.13
  # - repo: https://github.com/keewis/blackdoc
  #   rev: v0.4.3
  #   hooks:
  #     - id: blackdoc
  #       exclude: "generate_aggregations.py"
  #       additional_dependencies: ["black==24.8.0"]
  - repo: https://github.com/rbubley/mirrors-prettier
    rev: v3.6.2
    hooks:
      - id: prettier
        args: [--cache-location=.prettier_cache/cache]
  - repo: https://github.com/pre-commit/mirrors-mypy
    rev: v1.18.2
    hooks:
      - id: mypy
        # Copied from setup.cfg
        exclude: "properties|asv_bench"
        # This is slow and so we take it out of the fast-path; requires passing
        # `--hook-stage manual` to pre-commit
        stages: [manual]
        additional_dependencies: [
            # Type stubs
            types-python-dateutil,
            types-setuptools,
            types-PyYAML,
            types-pytz,
            typing-extensions>=4.1.0,
            numpy,
          ]
  - repo: https://github.com/citation-file-format/cff-converter-python
    rev: ebf0b5e44d67f8beaa1cd13a0d0393ea04c6058d
    hooks:
      - id: validate-cff
  - repo: https://github.com/ComPWA/taplo-pre-commit
    rev: v0.9.3
    hooks:
      - id: taplo-format
        args: ["--option", "array_auto_collapse=false"]
  - repo: https://github.com/abravalheri/validate-pyproject
    rev: v0.24.1
    hooks:
      - id: validate-pyproject
        additional_dependencies: ["validate-pyproject-schema-store[all]"]
  - repo: https://github.com/adhtruong/mirrors-typos
    rev: v1.37.2
    hooks:
      - id: typos