summaryrefslogtreecommitdiffstats
path: root/.pre-commit-config.yaml
blob: 84d82235c7c363c2469f2096b2a2a259f10b152f (plain)
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
default_language_version:
  python: python3
exclude: >
  (?x)^(
      deluge/ui/web/docs/template/.*|
      deluge/tests/data/.*svg|
  )$
repos:
  - repo: https://github.com/astral-sh/ruff-pre-commit
    # Ruff version.
    rev: v0.6.4
    hooks:
      - id: ruff
        name: Chk Ruff
        args: [--fix]
      - id: ruff-format
        name: Fmt Ruff
  - repo: https://github.com/pre-commit/mirrors-prettier
    rev: v2.7.1
    hooks:
      - id: prettier
        name: Fmt Prettier
        # Workaround to list modified files only.
        args: [--list-different]
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v4.4.0
    hooks:
      - id: end-of-file-fixer
        name: Fix End-of-files
        exclude_types: [javascript, css]
      - id: mixed-line-ending
        name: Fix Line endings
        args: [--fix=auto]
      - id: trailing-whitespace
        name: Fix Trailing whitespace
  - repo: https://github.com/asottile/pyupgrade
    rev: v3.3.1
    hooks:
      - id: pyupgrade
        args: [--py37-plus]
        stages: [manual]