mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-26 05:48:36 +08:00
58 lines
1.6 KiB
YAML
58 lines
1.6 KiB
YAML
repos:
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
rev: v4.5.0
|
|
hooks:
|
|
- id: trailing-whitespace
|
|
exclude: docs/modules/python
|
|
files: ^enterprise/
|
|
- id: end-of-file-fixer
|
|
exclude: docs/modules/python
|
|
files: ^enterprise/
|
|
- id: check-yaml
|
|
files: ^enterprise/
|
|
- id: debug-statements
|
|
files: ^enterprise/
|
|
- repo: https://github.com/abravalheri/validate-pyproject
|
|
rev: v0.16
|
|
hooks:
|
|
- id: validate-pyproject
|
|
types: [toml]
|
|
files: ^enterprise/pyproject\.toml$
|
|
|
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
# Ruff version.
|
|
rev: v0.4.1
|
|
hooks:
|
|
# Run the linter.
|
|
- id: ruff
|
|
entry: ruff check --config enterprise/dev_config/python/ruff.toml
|
|
types_or: [python, pyi, jupyter]
|
|
args: [--fix]
|
|
files: ^enterprise/
|
|
# Run the formatter.
|
|
- id: ruff-format
|
|
entry: ruff format --config enterprise/dev_config/python/ruff.toml
|
|
types_or: [python, pyi, jupyter]
|
|
files: ^enterprise/
|
|
|
|
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
rev: v1.9.0
|
|
hooks:
|
|
- id: mypy
|
|
additional_dependencies:
|
|
- types-requests
|
|
- types-setuptools
|
|
- types-pyyaml
|
|
- types-toml
|
|
- types-redis
|
|
- lxml
|
|
# OpenHands package in repo root
|
|
- ./
|
|
- stripe==11.5.0
|
|
- pygithub==2.6.1
|
|
# To see gaps add `--html-report mypy-report/`
|
|
entry: mypy --config-file enterprise/dev_config/python/mypy.ini enterprise/
|
|
always_run: true
|
|
pass_filenames: false
|
|
files: ^enterprise/
|