mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-26 08:33:49 +00:00
Fix broken make
targets format_diff
and lint_diff
(#8344)
Since the refactoring into sub-projects `libs/langchain` and `libs/experimental`, the `make` targets `format_diff` and `lint_diff` do not work anymore when running `make` from these subdirectories. Reason is that ``` PYTHON_FILES=$(shell git diff --name-only --diff-filter=d master | grep -E '\.py$$|\.ipynb$$') ``` generates paths from the project's root directory instead of the corresponding subdirectories. This PR fixes this by adding a `--relative` command line option. - Tag maintainer: @baskaryan
This commit is contained in:
parent
ae78ef7fe6
commit
93260a9922
@ -23,7 +23,7 @@ test_watch:
|
|||||||
# Define a variable for Python and notebook files.
|
# Define a variable for Python and notebook files.
|
||||||
PYTHON_FILES=.
|
PYTHON_FILES=.
|
||||||
lint format: PYTHON_FILES=.
|
lint format: PYTHON_FILES=.
|
||||||
lint_diff format_diff: PYTHON_FILES=$(shell git diff --name-only --diff-filter=d master | grep -E '\.py$$|\.ipynb$$')
|
lint_diff format_diff: PYTHON_FILES=$(shell git diff --relative=libs/experimental --name-only --diff-filter=d master | grep -E '\.py$$|\.ipynb$$')
|
||||||
|
|
||||||
lint lint_diff:
|
lint lint_diff:
|
||||||
poetry run mypy $(PYTHON_FILES)
|
poetry run mypy $(PYTHON_FILES)
|
||||||
|
@ -70,7 +70,7 @@ docker_tests:
|
|||||||
# Define a variable for Python and notebook files.
|
# Define a variable for Python and notebook files.
|
||||||
PYTHON_FILES=.
|
PYTHON_FILES=.
|
||||||
lint format: PYTHON_FILES=.
|
lint format: PYTHON_FILES=.
|
||||||
lint_diff format_diff: PYTHON_FILES=$(shell git diff --name-only --diff-filter=d master | grep -E '\.py$$|\.ipynb$$')
|
lint_diff format_diff: PYTHON_FILES=$(shell git diff --relative=libs/langchain --name-only --diff-filter=d master | grep -E '\.py$$|\.ipynb$$')
|
||||||
|
|
||||||
lint lint_diff:
|
lint lint_diff:
|
||||||
poetry run mypy $(PYTHON_FILES)
|
poetry run mypy $(PYTHON_FILES)
|
||||||
|
Loading…
Reference in New Issue
Block a user