File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3333 runs-on : ubuntu-latest
3434 steps :
3535 - uses : actions/checkout@v4
36+ with :
37+ fetch-depth : 0
3638 - name : Set up python
3739 uses : actions/setup-python@v5
3840 with :
4244 run : pip install pre-commit==3.7.0
4345 - name : Run pre-commit hooks
4446 run : |
47+ git fetch https://github.com/OpenDevin/OpenDevin.git main:main && \
4548 pre-commit run \
46- --all-files \
49+ --files \
50+ $(git diff --name-only $(git merge-base main $(git branch --show-current)) $(git branch --show-current) | tr '\n' ' ') \
4751 --show-diff-on-failure \
4852 --config ./dev_config/python/.pre-commit-config.yaml
Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ install-precommit-hooks:
150150
151151lint :
152152 @echo " $( YELLOW) Running linters...$( RESET) "
153- @poetry run pre-commit run --all- files --show-diff-on-failure --config $(PRECOMMIT_CONFIG_PATH )
153+ @poetry run pre-commit run --files $$( git diff --name-only $$( git merge-base main $$( git branch --show-current ) ) $$( git branch --show-current ) | tr '\n' ' ' ) --show-diff-on-failure --config $(PRECOMMIT_CONFIG_PATH )
154154
155155build-frontend :
156156 @echo " $( YELLOW) Building frontend...$( RESET) "
Original file line number Diff line number Diff line change @@ -20,16 +20,16 @@ repos:
2020
2121 - repo : https://github.com/astral-sh/ruff-pre-commit
2222 # Ruff version.
23- rev : v0.3.7
23+ rev : v0.4.1
2424 hooks :
2525 # Run the linter.
2626 - id : ruff
27- entry : ruff check --config dev_config/python/ruff.toml opendevin/ agenthub/
27+ entry : ruff check --config dev_config/python/ruff.toml
2828 types_or : [python, pyi, jupyter]
2929 args : [--fix]
3030 # Run the formatter.
3131 - id : ruff-format
32- entry : ruff check --config dev_config/python/ruff.toml opendevin/ agenthub/
32+ entry : ruff format --config dev_config/python/ruff.toml
3333 types_or : [python, pyi, jupyter]
3434
3535 - repo : https://github.com/pre-commit/mirrors-mypy
Original file line number Diff line number Diff line change @@ -15,7 +15,9 @@ ignore = [
1515 " E501" ,
1616]
1717
18- flake8-quotes = {inline-quotes = " single" }
18+ [lint .flake8-quotes ]
19+ docstring-quotes = " double"
20+ inline-quotes = " single"
1921
2022[format ]
2123quote-style = " single"
You can’t perform that action at this time.
0 commit comments