mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-24 15:43:54 +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 black .
|
||||||
poetry run ruff --select I --fix .
|
poetry run ruff --select I --fix .
|
||||||
|
|
||||||
lint:
|
PYTHON_FILES=.
|
||||||
poetry run mypy .
|
lint: PYTHON_FILES=.
|
||||||
poetry run black . --check
|
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 .
|
poetry run ruff .
|
||||||
|
|
||||||
test:
|
test:
|
||||||
|
Loading…
Reference in New Issue
Block a user