File: .pre-commit-config.yaml

package info (click to toggle)
python-msgspec 0.20.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,416 kB
  • sloc: javascript: 23,944; ansic: 20,940; python: 19,752; makefile: 26; sh: 23
file content (40 lines) | stat: -rw-r--r-- 974 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
local: &local
  language: system
  pass_filenames: false

local-pre-commit: &local-pre-commit
  <<: *local
  require_serial: true
  stages: [pre-commit]
local-manual: &local-manual
  <<: *local
  stages: [manual]

repos:
- repo: local
  hooks:
  # These default hooks apply fixes.
  - id: python-lint
    name: Lint Python code
    entry: ruff check --fix
    <<: *local-pre-commit
  - id: python-format
    name: Format Python code
    entry: ruff format
    <<: *local-pre-commit

  # These manual hooks suffixed with `-check` run their equivalently named default hooks without applying fixes.
  - id: python-lint-check
    name: Lint Python code (check-only)
    entry: ruff check
    <<: *local-manual
  - id: python-format-check
    name: Format Python code (check-only)
    entry: ruff format --diff
    <<: *local-manual

  # These hooks never apply fixes and run in all cases.
  - id: spelling
    name: Check for spelling errors
    entry: codespell
    <<: *local