.pre-commit-config.yaml 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. repos:
  2. - repo: https://github.com/pre-commit/pre-commit-hooks
  3. rev: v4.5.0
  4. hooks:
  5. - id: trailing-whitespace
  6. - id: end-of-file-fixer
  7. - id: check-yaml
  8. - id: debug-statements
  9. - repo: https://github.com/asottile/setup-cfg-fmt
  10. rev: v2.5.0
  11. hooks:
  12. - id: setup-cfg-fmt
  13. always_run: true
  14. pass_filenames: false
  15. - repo: https://github.com/astral-sh/ruff-pre-commit
  16. # Ruff version.
  17. rev: v0.3.7
  18. hooks:
  19. # Run the linter.
  20. - id: ruff
  21. entry: ruff check --config dev_config/python/ruff.toml opendevin/ agenthub/
  22. types_or: [ python, pyi, jupyter ]
  23. args: [ --fix ]
  24. # Run the formatter.
  25. - id: ruff-format
  26. entry: ruff check --config dev_config/python/ruff.toml opendevin/ agenthub/
  27. types_or: [ python, pyi, jupyter ]
  28. - repo: https://github.com/pre-commit/mirrors-mypy
  29. rev: v1.9.0
  30. hooks:
  31. - id: mypy
  32. additional_dependencies: [types-requests, types-setuptools, types-pyyaml, types-toml]
  33. entry: mypy --config-file dev_config/python/mypy.ini opendevin/ agenthub/
  34. always_run: true
  35. pass_filenames: false