.pre-commit-config.yaml 1.3 KB

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