Skip to content

The agent engineering platform.

Add lint_diff command (#2449)

William FHc9ae0c58083b
diff --git a/Makefile b/Makefile
index 24a1818190..5fc6fff618 100644
--- a/Makefile
+++ b/Makefile
@@ -23,9 +23,13 @@ format:
poetry run black .
poetry run ruff --select I --fix .
-lint:
- poetry run mypy .
- poetry run black . --check
+PYTHON_FILES=.
+lint: PYTHON_FILES=.
+lint_diff: PYTHON_FILES=$(shell git diff --name-only --diff-filter=d master | grep -E '\.py$$')
+
+lint lint_diff:
+ poetry run mypy $(PYTHON_FILES)
+ poetry run black $(PYTHON_FILES) --check
poetry run ruff .
test: