aboutsummaryrefslogtreecommitdiffstats
path: root/.pre-commit-config.yaml
blob: 3fdd30bf49dbdbb3c2446c82abe6a95f9061bc2b (plain) (blame)
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
repos:
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v4.4.0
    hooks:
      - id: check-merge-conflict
      - id: check-toml
      - id: check-yaml
      - id: end-of-file-fixer
      - id: trailing-whitespace
        args: [--markdown-linebreak-ext=md]

  - repo: local
    hooks:
      - id: isort
        name: isort
        description: This hook runs isort within our project's environment.
        entry: poetry run isort
        language: system
        types: [python]
        require_serial: true

      - id: ruff
        name: ruff
        description: Run ruff linting
        entry: poetry run ruff check --force-exclude
        language: system
        'types_or': [python, pyi]
        require_serial: true
        args: [--fix, --exit-non-zero-on-fix]