mirror of
https://github.com/hwchase17/langchain.git
synced 2025-05-06 23:58:51 +00:00
Add lint_diff command (#2449)
It's helpful for developers to run the linter locally on just the changed files. This PR adds support for a `lint_diff` command. Ruff is still run over the entire directory since it's very fast.
This commit is contained in:
parent
3d871853df
commit
c9ae0c5808
10
Makefile
10
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:
|
||||
|
Loading…
Reference in New Issue
Block a user