-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.pre-commit-config.yaml
39 lines (38 loc) · 1.39 KB
/
.pre-commit-config.yaml
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
repos:
- repo: https://github.com/python-poetry/poetry
rev: '1.8.3'
hooks:
- id: poetry-check
- id: poetry-export
args: [ "--with", "doc", "--without-hashes", "-o", "docs/requirements.txt", "-f", "requirements.txt" ]
files: 'poetry.lock'
- repo: local
hooks:
# Ruff hooks are copied from https://github.com/astral-sh/ruff-pre-commit, but specifying
# a local repo ensures using locked version of Ruff in Poetry.
- id: ruff
name: ruff
description: "Run 'ruff' for extremely fast Python linting"
entry: ruff check --force-exclude
language: python
types_or: [ python, pyi, jupyter ]
args: [ ]
require_serial: true
additional_dependencies: [ ]
- id: ruff-format
name: ruff-format
description: "Run 'ruff format' for extremely fast Python formatting"
entry: ruff format --force-exclude
language: python
types_or: [ python, pyi, jupyter ]
args: [ ]
require_serial: true
additional_dependencies: [ ]
- id: nbstripout
name: nbstripout
description: 'nbstripout: strip output from Jupyter and IPython notebooks'
entry: nbstripout
args: [ '--keep-metadata-keys', '"cell.metadata.collapsed cell.metadata.scrolled"' ]
language: system
types: [ jupyter ]
require_serial: true