Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ jobs:
- name: Install uv
uses: astral-sh/setup-uv@v7

# Keep in sync ruff version with .pre-commit-config.yaml
- name: Run Ruff Linter
run: |
uvx ruff@0.14.5 check .
Expand All @@ -90,6 +91,7 @@ jobs:
uv build
uv pip install dist/*.whl

# Keep in sync mypy version with .pre-commit-config.yaml
- name: Run Mypy Type Checker
run: |
uvx mypy@1.18.2
32 changes: 32 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
repos:
# Ruff for linting and formatting
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.5 # Keep in sync with GitHub Actions workflow
hooks:
# Run the linter
- id: ruff
args: [--fix]
# Run the formatter
- id: ruff-format

# mypy for type checking
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.18.2 # Keep in sync with GitHub Actions workflow
hooks:
- id: mypy
args: [--config-file=pyproject.toml]
files: ^(language_tool_python|tests)/

# Standard pre-commit hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
args: [--maxkb=1000]
- id: check-json
- id: check-toml
- id: mixed-line-ending
args: [--fix=lf]
6 changes: 6 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ recursive-include language_tool_python *.py *.toml
include language_tool_python/py.typed

prune .github/
prune .mypy_cache/
prune .pytest-cache/
prune .ruff_cache/
prune env/
Expand All @@ -16,12 +17,17 @@ prune ENV/
prune env.bak/
prune venv.bak/
prune docs/
prune htmlcov/
prune tests/

exclude .coverage
exclude .gitignore
exclude .pre-commit-config.yaml
exclude .readthedocs.yaml
exclude CHANGELOG.md
exclude CONTRIBUTING.md
exclude coverage-badge.svg
exclude coverage.xml
exclude make.bat
exclude Makefile
exclude pytest.ini
Expand Down