Files
docling-core/.pre-commit-config.yaml
Cesar Berrospi Ramis 2a78701b3f chore: update pre-commit hooks and development dependencies (#638)
* chore: update pre-commit hooks and development dependencies

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>

* docs: update CONTRIBUTING after pre-commit hook changes

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>

---------

Signed-off-by: Cesar Berrospi Ramis <ceb@zurich.ibm.com>
2026-06-15 17:07:34 +02:00

48 lines
1.4 KiB
YAML

fail_fast: true
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.17
hooks:
- id: ruff-check
name: "Ruff linter"
args: [--exit-non-zero-on-fix, --fix, --config=pyproject.toml]
files: '^(docling_core|test|docs/examples|examples).*\.(py|ipynb)$'
pass_filenames: false
- id: ruff-format
name: "Ruff formatter"
args: [--config=pyproject.toml]
files: '^(docling_core|test|docs/examples|examples).*\.(py|ipynb)$'
pass_filenames: false
- repo: local
hooks:
- id: mypy
name: MyPy
entry: uv run --no-sync mypy docling_core test
pass_filenames: false
language: system
files: '\.py$'
- repo: local
hooks:
- id: pytest
name: Pytest
entry: uv run --no-sync pytest --cov=docling_core --cov-report=xml test
pass_filenames: false
language: system
files: '\.py$'
- repo: local
hooks:
- id: docs
name: Docs
entry: uv run --no-sync python -m docling_core.utils.generate_docs docs
pass_filenames: false
language: system
files: '\.py$'
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.11.21
hooks:
- id: uv-lock
name: "uv lockfile"
entry: uv lock
pass_filenames: false
language: system