1
0
mirror of https://github.com/hwchase17/langchain.git synced 2025-05-06 23:58:51 +00:00

Add lint_diff command ()

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:
William FH 2023-04-05 09:34:24 -07:00 committed by GitHub
parent 3d871853df
commit c9ae0c5808
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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: