• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1repos:
2  - repo: https://github.com/astral-sh/ruff-pre-commit
3    rev: v0.6.7
4    hooks:
5      - id: ruff
6        name: Run Ruff (lint) on Doc/
7        args: [--exit-non-zero-on-fix]
8        files: ^Doc/
9      - id: ruff
10        name: Run Ruff (lint) on Lib/test/
11        args: [--exit-non-zero-on-fix]
12        files: ^Lib/test/
13      - id: ruff
14        name: Run Ruff (lint) on Argument Clinic
15        args: [--exit-non-zero-on-fix, --config=Tools/clinic/.ruff.toml]
16        files: ^Tools/clinic/|Lib/test/test_clinic.py
17      - id: ruff-format
18        name: Run Ruff (format) on Doc/
19        args: [--check]
20        files: ^Doc/
21
22  - repo: https://github.com/psf/black-pre-commit-mirror
23    rev: 24.4.2
24    hooks:
25      - id: black
26        name: Run Black on Tools/jit/
27        files: ^Tools/jit/
28        language_version: python3.12
29
30  - repo: https://github.com/pre-commit/pre-commit-hooks
31    rev: v4.5.0
32    hooks:
33      - id: check-case-conflict
34      - id: check-merge-conflict
35      - id: check-toml
36        exclude: ^Lib/test/test_tomllib/
37      - id: check-yaml
38      - id: end-of-file-fixer
39        types: [python]
40        exclude: Lib/test/tokenizedata/coding20731.py
41      - id: trailing-whitespace
42        types_or: [c, inc, python, rst]
43
44  - repo: https://github.com/sphinx-contrib/sphinx-lint
45    rev: v0.9.1
46    hooks:
47      - id: sphinx-lint
48        args: [--enable=default-role]
49        files: ^Doc/|^Misc/NEWS.d/
50
51  - repo: meta
52    hooks:
53      - id: check-hooks-apply
54      - id: check-useless-excludes
55