File: .pre-commit-config.yaml

package info (click to toggle)
matplotlib 3.10.1%2Bdfsg1-4
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 78,352 kB
  • sloc: python: 147,118; cpp: 62,988; objc: 1,679; ansic: 1,426; javascript: 786; makefile: 104; sh: 53
file content (122 lines) | stat: -rw-r--r-- 4,346 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
115
116
117
118
119
120
121
122
---
ci:
  autofix_prs: false
  autoupdate_schedule: 'quarterly'
exclude: |
  (?x)^(
    extern|
    LICENSE|
    lib/matplotlib/mpl-data|
    doc/devel/gitwash|
    doc/users/prev|
    doc/api/prev|
    lib/matplotlib/tests/tinypages
    )
repos:
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v5.0.0
    hooks:
      - id: check-added-large-files
      - id: check-docstring-first
        exclude: lib/matplotlib/typing.py  # docstring used for attribute flagged by check
      - id: end-of-file-fixer
        exclude_types: [svg]
      - id: mixed-line-ending
      - id: name-tests-test
        args: ["--pytest-test-first"]
      - id: no-commit-to-branch  # Default is master and main.
      - id: trailing-whitespace
        exclude_types: [svg]
  - repo: https://github.com/pre-commit/mirrors-mypy
    rev: v1.11.2
    hooks:
      - id: mypy
        additional_dependencies:
          - pandas-stubs
          - types-pillow
          - types-python-dateutil
          - types-psutil
          - types-docutils
          - types-PyYAML
        args: ["--config-file=pyproject.toml", "lib/matplotlib"]
        files: lib/matplotlib  # Only run when files in lib/matplotlib are changed.
        pass_filenames: false
  - repo: https://github.com/pycqa/flake8
    rev: 7.1.1
    hooks:
      - id: flake8
        additional_dependencies:
          - pydocstyle>5.1.0
          - flake8-docstrings>1.4.0
          - flake8-force
        args: ["--docstring-convention=all"]
  - repo: https://github.com/codespell-project/codespell
    rev: v2.3.0
    hooks:
      - id: codespell
        files: ^.*\.(py|c|cpp|h|m|md|rst|yml)$
        args:
          - "--ignore-words"
          - "ci/codespell-ignore-words.txt"
          - "--skip"
          - "doc/project/credits.rst"
  - repo: https://github.com/pycqa/isort
    rev: 5.13.2
    hooks:
      - id: isort
        name: isort (python)
        files: ^galleries/tutorials/|^galleries/examples/|^galleries/plot_types/
  - repo: https://github.com/rstcheck/rstcheck
    rev: v6.2.4
    hooks:
      - id: rstcheck
        additional_dependencies:
          - sphinx>=1.8.1
          - tomli
  - repo: https://github.com/adrienverge/yamllint
    rev: v1.35.1
    hooks:
      - id: yamllint
        args: ["--strict", "--config-file=.yamllint.yml"]
  - repo: https://github.com/python-jsonschema/check-jsonschema
    rev: 0.29.3
    hooks:
      # TODO: Re-enable this when https://github.com/microsoft/azure-pipelines-vscode/issues/567 is fixed.
      # - id: check-azure-pipelines
      - id: check-dependabot
      - id: check-github-workflows
      # NOTE: If any of the below schema files need to be changed, be sure to
      # update the `ci/vendor_schemas.py` script.
      - id: check-jsonschema
        name: "Validate AppVeyor config"
        files: ^\.appveyor\.yml$
        args: ["--verbose", "--schemafile", "ci/schemas/appveyor.json"]
      - id: check-jsonschema
        name: "Validate CircleCI config"
        files: ^\.circleci/config\.yml$
        args: ["--verbose", "--schemafile", "ci/schemas/circleciconfig.json"]
      - id: check-jsonschema
        name: "Validate GitHub funding file"
        files: ^\.github/FUNDING\.yml$
        args: ["--verbose", "--schemafile", "ci/schemas/github-funding.json"]
      - id: check-jsonschema
        name: "Validate GitHub issue config"
        files: ^\.github/ISSUE_TEMPLATE/config\.yml$
        args: ["--verbose", "--schemafile", "ci/schemas/github-issue-config.json"]
      - id: check-jsonschema
        name: "Validate GitHub issue templates"
        files: ^\.github/ISSUE_TEMPLATE/.*\.yml$
        exclude: ^\.github/ISSUE_TEMPLATE/config\.yml$
        args: ["--verbose", "--schemafile", "ci/schemas/github-issue-forms.json"]
      - id: check-jsonschema
        name: "Validate CodeCov config"
        files: ^\.github/codecov\.yml$
        args: ["--verbose", "--schemafile", "ci/schemas/codecov.json"]
      - id: check-jsonschema
        name: "Validate GitHub labeler config"
        files: ^\.github/labeler\.yml$
        args: ["--verbose", "--schemafile", "ci/schemas/pull-request-labeler-5.json"]
      - id: check-jsonschema
        name: "Validate Conda environment file"
        files: ^environment\.yml$
        args: ["--verbose", "--schemafile", "ci/schemas/conda-environment.json"]