INFRA: Lint for imports (#13632)

- Adds pydantic/import linting to core
- Adds a check for `langchain_experimental` imports to langchain
This commit is contained in:
Erick Friis
2023-11-21 17:42:56 -08:00
committed by GitHub
parent 131db4ba68
commit c5ae9f832d
4 changed files with 49 additions and 0 deletions

View File

@@ -26,6 +26,8 @@ lint format: PYTHON_FILES=.
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:
./scripts/check_pydantic.sh .
./scripts/check_imports.sh
poetry run ruff .
[ "$(PYTHON_FILES)" = "" ] || poetry run ruff format $(PYTHON_FILES) --diff
[ "$(PYTHON_FILES)" = "" ] || poetry run mypy $(PYTHON_FILES)