Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
595a26a
Added ruff to dev dependencies
schwarbf Dec 10, 2025
18cde33
Added ruff settings to pyproject.toml as in docling
schwarbf Dec 10, 2025
4a435d5
Cleanup uf pyproject.toml
schwarbf Dec 10, 2025
6f369f6
Copied settings for ruff pre-commit hooks from docling
schwarbf Dec 10, 2025
735af19
Excluded test/data/** from ruff formatting / linting
schwarbf Dec 10, 2025
e37506b
ruff format
schwarbf Dec 10, 2025
1a748ca
Added some ignore statements to pyproject.toml such that ruff check r…
schwarbf Dec 10, 2025
a35d7ca
ruff check --fix
schwarbf Dec 10, 2025
9769035
Ignored some more rules
schwarbf Dec 10, 2025
0ebeb43
Fixed the rest of the errors that would only concern 1 - 3 files
schwarbf Dec 10, 2025
fb1cb1a
Added another ignore related to df for DataFrame names
schwarbf Dec 10, 2025
b4f8ca0
Modified CONTRIBUTING.md such that black / isort are replaced by ruff
schwarbf Dec 10, 2025
8c553eb
Added UP045 to ignore list such that Optional[...] does not raise
schwarbf Dec 12, 2025
3dc2048
Moved .flake8 configs to pyproject.toml
schwarbf Dec 12, 2025
86686ef
Moved autoflake to be used with ruff
schwarbf Dec 12, 2025
1cd3d3f
Moved all .flake8 settings to pyproject.toml to be compatible with ru…
schwarbf Dec 12, 2025
f575e2c
Removed flake8 from .pre-commit hooks
schwarbf Dec 12, 2025
0a23adb
Applied ruff format (again); formatted some files as the line-length …
schwarbf Dec 12, 2025
6a3aabe
Set max-complexity to 30 (as was originally) in the pyproject.toml as…
schwarbf Dec 12, 2025
c362673
Adding PD901 to ignore list such that pre-commit hooks run fully again
schwarbf Dec 12, 2025
b60b5c3
Replaced dtype | None syntax by Optional[dtype] in remaining places
schwarbf Dec 16, 2025
847e5fb
chore: fix 'test' ref in pyproject
ceberam Jan 13, 2026
148c03f
style: remove typing List, Set, Tuple, Dict
ceberam Jan 13, 2026
0b85e82
style: remove UP015 check from ignore list
ceberam Jan 13, 2026
6f4b277
style: remove UP034 check from ignore list
ceberam Jan 13, 2026
72e6902
style: normalize dashes in comments and docstrings
ceberam Jan 13, 2026
d24bcaf
style: remove PD901 check from ignore list
ceberam Jan 13, 2026
3fa75d0
style: remove C403 check from ignore list
ceberam Jan 13, 2026
2deeb03
style: remove C403, C413, C416 check from ignore list
ceberam Jan 13, 2026
a73490d
style: remove E203, F811 check from ignore list
ceberam Jan 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions .flake8

This file was deleted.

43 changes: 11 additions & 32 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,29 +1,16 @@
fail_fast: true
repos:
- repo: local
hooks:
- id: black
name: Black
entry: uv run --no-sync black docling_core test
pass_filenames: false
language: system
files: '\.py$'
- repo: local
hooks:
- id: isort
name: isort
entry: uv run --no-sync isort docling_core test
pass_filenames: false
language: system
files: '\.py$'
- repo: local
hooks:
- id: autoflake
name: autoflake
entry: uv run --no-sync autoflake docling_core test
pass_filenames: false
language: system
files: '\.py$'
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.11.5
hooks:
- id: ruff-format
name: "Ruff formatter"
args: [--config=pyproject.toml]
files: '^(docling_core|tests|docs/examples).*\.(py|ipynb)$'
- id: ruff
name: "Ruff linter"
args: [--exit-non-zero-on-fix, --fix, --config=pyproject.toml]
files: '^(docling_core|tests|docs/examples).*\.(py|ipynb)$'
- repo: local
hooks:
- id: mypy
Expand All @@ -32,14 +19,6 @@ repos:
pass_filenames: false
language: system
files: '\.py$'
- repo: local
hooks:
- id: flake8
name: Flake8
entry: uv run --no-sync flake8 docling_core
pass_filenames: false
language: system
files: '\.py$'
- repo: local
hooks:
- id: pytest
Expand Down
6 changes: 1 addition & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ uv add [OPTIONS] <PACKAGES|--requirements <REQUIREMENTS>>

We use the following tools to enforce code style:

- isort, to sort imports
- Black, to format code
- Ruff, to format and lint code
- Flake8, to lint code
- autoflake, to remove unused variables and imports
- [MyPy](https://mypy.readthedocs.io), as static type checker
Expand All @@ -65,9 +64,6 @@ To run the checks on-demand, type:
uv run pre-commit run --all-files
```

Note: Checks like `Black` and `isort` will _fail_ if they modify files. This is because `pre-commit` doesn't like to see files modified by their hooks. In these cases, `git add` the modified files and `git commit` again.


### Documentation

We use [JSON Schema for Humans](https://github.com/coveooss/json-schema-for-humans) to generate Markdown pages documenting the JSON schema of the Docling objects.
Expand Down
Loading
Loading