Adding pre-commit and CI for ruff and mypy (#69)

* don't modify directories

* oops typo

* dev_config/python

* add config to CI

* bump CI python to 3.10

* 3.11?

* del actions/

* add suggestions

* delete unused code

* missed some

* oops missed another one

* remove a file
This commit is contained in:
geohotstan
2024-03-24 07:41:49 +08:00
committed by GitHub
parent 642e1b3cd0
commit fb1822123a
17 changed files with 88 additions and 47 deletions

View File

@@ -0,0 +1,17 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.3
hooks:
- id: ruff
entry: ruff check --config dev_config/python/ruff.toml opendevin/ server/ agenthub/
always_run: true
pass_filenames: false
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.9.0
hooks:
- id: mypy
additional_dependencies: [types-requests, types-setuptools]
entry: mypy --config-file dev_config/python/mypy.ini opendevin/ server/ agenthub/
always_run: true
pass_filenames: false

View File

@@ -0,0 +1,11 @@
[mypy]
warn_unused_configs = True
ignore_missing_imports = True
check_untyped_defs = True
explicit_package_bases = True
warn_unreachable = True
warn_redundant_casts = True
no_implicit_optional = True
strict_optional = True
exclude = agenthub/langchains_agent/regression

View File

@@ -0,0 +1,3 @@
exclude = [
"agenthub/langchains_agent/regression/",
]