summaryrefslogtreecommitdiff
path: root/.pre-commit-config.yaml
blob: 04a9693f0e02eae0f1d1ab0a6d04b48cbf495ba9 (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
---
ci:
  # https://pre-commit.ci/#configuration
  autoupdate_schedule: weekly
  autofix_prs: false

# https://pre-commit.com/#adding-pre-commit-plugins-to-your-project
repos:
  - repo: https://github.com/pycqa/isort
    rev: 5.11.5
    hooks:
    - id: isort
      # This is here to defer file selection to isort which will do it based on
      # black config.
      pass_filenames: false
      require_serial: true
      args: ["."]
  - repo: https://github.com/psf/black
    # WARNING: version should be the same as in `pyproject.toml`
    # Using git ref spec because of https://github.com/psf/black/issues/2493
    rev: 'refs/tags/23.3.0:refs/tags/23.3.0'
    hooks:
    - id: black
      pass_filenames: false
      require_serial: true
      args: ["."]
  - repo: https://github.com/python-poetry/poetry
    rev: 1.4.2
    hooks:
    - id: poetry-check
    - id: poetry-lock
      # sadly `--no-update` does not work on pre-commit.ci
      args: ["--check"]