Skip to content

The agent engineering platform.

all: Improve make lint command (#25344)

Christophe Bornet038c287b3a17
diff --git a/libs/cli/langchain_cli/integration_template/Makefile b/libs/cli/langchain_cli/integration_template/Makefile
index aeb3a5754c..81124d8c32 100644
--- a/libs/cli/langchain_cli/integration_template/Makefile
+++ b/libs/cli/langchain_cli/integration_template/Makefile
@@ -30,14 +30,13 @@ lint_tests: PYTHON_FILES=tests
lint_tests: MYPY_CACHE=.mypy_cache_test
lint lint_diff lint_package lint_tests:
- poetry run ruff .
- poetry run ruff format $(PYTHON_FILES) --diff
- poetry run ruff --select I $(PYTHON_FILES)
- mkdir -p $(MYPY_CACHE); poetry run mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff format $(PYTHON_FILES) --diff
+ [ "$(PYTHON_FILES)" = "" ] || mkdir -p $(MYPY_CACHE) && poetry run mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE)
format format_diff:
- poetry run ruff format $(PYTHON_FILES)
- poetry run ruff --select I --fix $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff format $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff --select I --fix $(PYTHON_FILES)
spell_check:
poetry run codespell --toml pyproject.toml
diff --git a/libs/community/Makefile b/libs/community/Makefile
index 4ff7057ab7..1eff4253ca 100644
--- a/libs/community/Makefile
+++ b/libs/community/Makefile
@@ -48,14 +48,13 @@ lint lint_diff lint_package lint_tests:
./scripts/check_pydantic.sh .
./scripts/lint_imports.sh .
./scripts/check_pickle.sh .
- poetry run ruff check .
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff check $(PYTHON_FILES)
[ "$(PYTHON_FILES)" = "" ] || poetry run ruff format $(PYTHON_FILES) --diff
- [ "$(PYTHON_FILES)" = "" ] || poetry run ruff check --select I $(PYTHON_FILES)
[ "$(PYTHON_FILES)" = "" ] || mkdir -p $(MYPY_CACHE) && poetry run mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE)
format format_diff:
- poetry run ruff format $(PYTHON_FILES)
- poetry run ruff check --select I --fix $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff format $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff check --select I --fix $(PYTHON_FILES)
spell_check:
poetry run codespell --toml pyproject.toml
diff --git a/libs/core/Makefile b/libs/core/Makefile
index e62adb6439..90e0642e72 100644
--- a/libs/core/Makefile
+++ b/libs/core/Makefile
@@ -41,15 +41,13 @@ lint_tests: MYPY_CACHE=.mypy_cache_test
lint lint_diff lint_package lint_tests:
./scripts/check_pydantic.sh .
./scripts/lint_imports.sh
- poetry run ruff check .
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff check $(PYTHON_FILES)
[ "$(PYTHON_FILES)" = "" ] || poetry run ruff format $(PYTHON_FILES) --diff
- [ "$(PYTHON_FILES)" = "" ] || poetry run ruff check --select I $(PYTHON_FILES)
- [ "$(PYTHON_FILES)" = "" ] || poetry run mypy $(PYTHON_FILES)
[ "$(PYTHON_FILES)" = "" ] || mkdir -p $(MYPY_CACHE) && poetry run mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE)
format format_diff:
- poetry run ruff format $(PYTHON_FILES)
- poetry run ruff check --select I --fix $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff format $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff check --select I --fix $(PYTHON_FILES)
spell_check:
poetry run codespell --toml pyproject.toml
diff --git a/libs/experimental/Makefile b/libs/experimental/Makefile
index de7cc904a4..af7fa87ab9 100644
--- a/libs/experimental/Makefile
+++ b/libs/experimental/Makefile
@@ -39,14 +39,13 @@ lint_tests: PYTHON_FILES=tests
lint_tests: MYPY_CACHE=.mypy_cache_test
lint lint_diff lint_package lint_tests:
- poetry run ruff check .
- poetry run ruff format $(PYTHON_FILES) --diff
- poetry run ruff check --select I $(PYTHON_FILES)
- mkdir -p $(MYPY_CACHE); poetry run mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff check $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff format $(PYTHON_FILES) --diff
+ [ "$(PYTHON_FILES)" = "" ] || mkdir -p $(MYPY_CACHE) && poetry run mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE)
format format_diff:
- poetry run ruff format $(PYTHON_FILES)
- poetry run ruff check --select I --fix $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff format $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff check --select I --fix $(PYTHON_FILES)
spell_check:
poetry run codespell --toml pyproject.toml
diff --git a/libs/langchain/Makefile b/libs/langchain/Makefile
index 09d331311d..c77591f643 100644
--- a/libs/langchain/Makefile
+++ b/libs/langchain/Makefile
@@ -56,9 +56,8 @@ lint_tests: MYPY_CACHE=.mypy_cache_test
lint lint_diff lint_package lint_tests:
./scripts/check_pydantic.sh .
./scripts/lint_imports.sh
- poetry run ruff check .
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff check $(PYTHON_FILES)
[ "$(PYTHON_FILES)" = "" ] || poetry run ruff format $(PYTHON_FILES) --diff
- [ "$(PYTHON_FILES)" = "" ] || poetry run ruff check --select I $(PYTHON_FILES)
[ "$(PYTHON_FILES)" = "" ] || mkdir -p $(MYPY_CACHE) && poetry run mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE)
format format_diff:
diff --git a/libs/partners/ai21/Makefile b/libs/partners/ai21/Makefile
index 0628d81839..ed548aa410 100644
--- a/libs/partners/ai21/Makefile
+++ b/libs/partners/ai21/Makefile
@@ -24,14 +24,13 @@ lint_tests: PYTHON_FILES=tests
lint_tests: MYPY_CACHE=.mypy_cache_test
lint lint_diff lint_package lint_tests:
- poetry run ruff check .
- poetry run ruff format $(PYTHON_FILES) --diff
- poetry run ruff check --select I $(PYTHON_FILES)
- mkdir $(MYPY_CACHE); poetry run mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff check $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff format $(PYTHON_FILES) --diff
+ [ "$(PYTHON_FILES)" = "" ] || mkdir -p $(MYPY_CACHE) && poetry run mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE)
format format_diff:
- poetry run ruff format $(PYTHON_FILES)
- poetry run ruff check --select I --fix $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff format $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff check --select I --fix $(PYTHON_FILES)
spell_check:
poetry run codespell --toml pyproject.toml
diff --git a/libs/partners/airbyte/Makefile b/libs/partners/airbyte/Makefile
index 48d595169e..882b1da6eb 100644
--- a/libs/partners/airbyte/Makefile
+++ b/libs/partners/airbyte/Makefile
@@ -24,14 +24,13 @@ lint_tests: PYTHON_FILES=tests
lint_tests: MYPY_CACHE=.mypy_cache_test
lint lint_diff lint_package lint_tests:
- poetry run ruff .
- poetry run ruff format $(PYTHON_FILES) --diff
- poetry run ruff --select I $(PYTHON_FILES)
- mkdir -p $(MYPY_CACHE); poetry run mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff format $(PYTHON_FILES) --diff
+ [ "$(PYTHON_FILES)" = "" ] || mkdir -p $(MYPY_CACHE) && poetry run mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE)
format format_diff:
- poetry run ruff format $(PYTHON_FILES)
- poetry run ruff --select I --fix $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff format $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff --select I --fix $(PYTHON_FILES)
spell_check:
poetry run codespell --toml pyproject.toml
diff --git a/libs/partners/anthropic/Makefile b/libs/partners/anthropic/Makefile
index f7028ce2ba..7e3178d3d6 100644
--- a/libs/partners/anthropic/Makefile
+++ b/libs/partners/anthropic/Makefile
@@ -25,14 +25,13 @@ lint_tests: PYTHON_FILES=tests
lint_tests: MYPY_CACHE=.mypy_cache_test
lint lint_diff lint_package lint_tests:
- poetry run ruff check .
- poetry run ruff format $(PYTHON_FILES) --diff
- poetry run ruff check --select I $(PYTHON_FILES)
- mkdir $(MYPY_CACHE); poetry run mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff check $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff format $(PYTHON_FILES) --diff
+ [ "$(PYTHON_FILES)" = "" ] || mkdir -p $(MYPY_CACHE) && poetry run mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE)
format format_diff:
- poetry run ruff format $(PYTHON_FILES)
- poetry run ruff check --select I --fix $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff format $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff check --select I --fix $(PYTHON_FILES)
spell_check:
poetry run codespell --toml pyproject.toml
diff --git a/libs/partners/azure-dynamic-sessions/Makefile b/libs/partners/azure-dynamic-sessions/Makefile
index 55d5a84662..fca7d1ae25 100644
--- a/libs/partners/azure-dynamic-sessions/Makefile
+++ b/libs/partners/azure-dynamic-sessions/Makefile
@@ -27,14 +27,13 @@ lint_tests: PYTHON_FILES=tests
lint_tests: MYPY_CACHE=.mypy_cache_test
lint lint_diff lint_package lint_tests:
- poetry run ruff check .
- poetry run ruff format $(PYTHON_FILES) --diff
- poetry run ruff check --select I $(PYTHON_FILES)
- mkdir $(MYPY_CACHE); poetry run mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff check $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff format $(PYTHON_FILES) --diff
+ [ "$(PYTHON_FILES)" = "" ] || mkdir -p $(MYPY_CACHE) && poetry run mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE)
format format_diff:
- poetry run ruff format $(PYTHON_FILES)
- poetry run ruff check --select I --fix $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff format $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff check --select I --fix $(PYTHON_FILES)
spell_check:
poetry run codespell --toml pyproject.toml
diff --git a/libs/partners/chroma/Makefile b/libs/partners/chroma/Makefile
index 4e317a0901..45b2faafa8 100644
--- a/libs/partners/chroma/Makefile
+++ b/libs/partners/chroma/Makefile
@@ -25,14 +25,13 @@ lint_tests: PYTHON_FILES=tests
lint_tests: MYPY_CACHE=.mypy_cache_test
lint lint_diff lint_package lint_tests:
- poetry run ruff check .
- poetry run ruff format $(PYTHON_FILES) --diff
- poetry run ruff check --select I $(PYTHON_FILES)
- mkdir $(MYPY_CACHE); poetry run mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff check $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff format $(PYTHON_FILES) --diff
+ [ "$(PYTHON_FILES)" = "" ] || mkdir -p $(MYPY_CACHE) && poetry run mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE)
format format_diff:
- poetry run ruff format $(PYTHON_FILES)
- poetry run ruff check --select I --fix $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff format $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff check --select I --fix $(PYTHON_FILES)
spell_check:
poetry run codespell --toml pyproject.toml
diff --git a/libs/partners/couchbase/Makefile b/libs/partners/couchbase/Makefile
index 41356d6cd4..2d85a7d830 100644
--- a/libs/partners/couchbase/Makefile
+++ b/libs/partners/couchbase/Makefile
@@ -30,14 +30,13 @@ lint_tests: PYTHON_FILES=tests
lint_tests: MYPY_CACHE=.mypy_cache_test
lint lint_diff lint_package lint_tests:
- poetry run ruff check .
- poetry run ruff format $(PYTHON_FILES) --diff
- poetry run ruff check --select I $(PYTHON_FILES)
- mkdir -p $(MYPY_CACHE); poetry run mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff check $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff format $(PYTHON_FILES) --diff
+ [ "$(PYTHON_FILES)" = "" ] || mkdir -p $(MYPY_CACHE) && poetry run mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE)
format format_diff:
- poetry run ruff format $(PYTHON_FILES)
- poetry run ruff check --select I --fix $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff format $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff check --select I --fix $(PYTHON_FILES)
spell_check:
poetry run codespell --toml pyproject.toml
diff --git a/libs/partners/exa/Makefile b/libs/partners/exa/Makefile
index 524e43e4fe..ede92c03c5 100644
--- a/libs/partners/exa/Makefile
+++ b/libs/partners/exa/Makefile
@@ -29,14 +29,13 @@ lint_tests: PYTHON_FILES=tests
lint_tests: MYPY_CACHE=.mypy_cache_test
lint lint_diff lint_package lint_tests:
- poetry run ruff check .
- poetry run ruff format $(PYTHON_FILES) --diff
- poetry run ruff check --select I $(PYTHON_FILES)
- mkdir $(MYPY_CACHE); poetry run mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff check $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff format $(PYTHON_FILES) --diff
+ [ "$(PYTHON_FILES)" = "" ] || mkdir -p $(MYPY_CACHE) && poetry run mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE)
format format_diff:
- poetry run ruff format $(PYTHON_FILES)
- poetry run ruff check --select I --fix $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff format $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff check --select I --fix $(PYTHON_FILES)
spell_check:
poetry run codespell --toml pyproject.toml
diff --git a/libs/partners/fireworks/Makefile b/libs/partners/fireworks/Makefile
index 4a17f3ea2e..92abd753ea 100644
--- a/libs/partners/fireworks/Makefile
+++ b/libs/partners/fireworks/Makefile
@@ -25,14 +25,13 @@ lint_tests: PYTHON_FILES=tests
lint_tests: MYPY_CACHE=.mypy_cache_test
lint lint_diff lint_package lint_tests:
- poetry run ruff check .
- poetry run ruff format $(PYTHON_FILES) --diff
- poetry run ruff check --select I $(PYTHON_FILES)
- mkdir $(MYPY_CACHE); poetry run mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff check $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff format $(PYTHON_FILES) --diff
+ [ "$(PYTHON_FILES)" = "" ] || mkdir -p $(MYPY_CACHE) && poetry run mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE)
format format_diff:
- poetry run ruff format $(PYTHON_FILES)
- poetry run ruff check --select I --fix $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff format $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff check --select I --fix $(PYTHON_FILES)
spell_check:
poetry run codespell --toml pyproject.toml
diff --git a/libs/partners/groq/Makefile b/libs/partners/groq/Makefile
index 1831d2c9e0..ad229fe8f2 100644
--- a/libs/partners/groq/Makefile
+++ b/libs/partners/groq/Makefile
@@ -25,14 +25,13 @@ lint_tests: PYTHON_FILES=tests
lint_tests: MYPY_CACHE=.mypy_cache_test
lint lint_diff lint_package lint_tests:
- poetry run ruff check .
- poetry run ruff format $(PYTHON_FILES) --diff
- poetry run ruff check --select I $(PYTHON_FILES)
- mkdir $(MYPY_CACHE); poetry run mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff check $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff format $(PYTHON_FILES) --diff
+ [ "$(PYTHON_FILES)" = "" ] || mkdir -p $(MYPY_CACHE) && poetry run mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE)
format format_diff:
- poetry run ruff format $(PYTHON_FILES)
- poetry run ruff check --select I --fix $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff format $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff check --select I --fix $(PYTHON_FILES)
spell_check:
poetry run codespell --toml pyproject.toml
diff --git a/libs/partners/huggingface/Makefile b/libs/partners/huggingface/Makefile
index aa1548d94b..26c79bf123 100644
--- a/libs/partners/huggingface/Makefile
+++ b/libs/partners/huggingface/Makefile
@@ -26,14 +26,13 @@ lint_tests: PYTHON_FILES=tests
lint_tests: MYPY_CACHE=.mypy_cache_test
lint lint_diff lint_package lint_tests:
- poetry run ruff check .
- poetry run ruff format $(PYTHON_FILES) --diff
- poetry run ruff check --select I $(PYTHON_FILES)
- mkdir $(MYPY_CACHE); poetry run mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff check $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff format $(PYTHON_FILES) --diff
+ [ "$(PYTHON_FILES)" = "" ] || mkdir -p $(MYPY_CACHE) && poetry run mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE)
format format_diff:
- poetry run ruff format $(PYTHON_FILES)
- poetry run ruff check --select I --fix $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff format $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff check --select I --fix $(PYTHON_FILES)
spell_check:
poetry run codespell --toml pyproject.toml
diff --git a/libs/partners/milvus/Makefile b/libs/partners/milvus/Makefile
index 263896e6e0..ece960712f 100644
--- a/libs/partners/milvus/Makefile
+++ b/libs/partners/milvus/Makefile
@@ -25,14 +25,13 @@ lint_tests: PYTHON_FILES=tests
lint_tests: MYPY_CACHE=.mypy_cache_test
lint lint_diff lint_package lint_tests:
- poetry run ruff .
- poetry run ruff format $(PYTHON_FILES) --diff
- poetry run ruff --select I $(PYTHON_FILES)
- mkdir $(MYPY_CACHE); poetry run mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff format $(PYTHON_FILES) --diff
+ [ "$(PYTHON_FILES)" = "" ] || mkdir -p $(MYPY_CACHE) && poetry run mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE)
format format_diff:
- poetry run ruff format $(PYTHON_FILES)
- poetry run ruff --select I --fix $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff format $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff --select I --fix $(PYTHON_FILES)
spell_check:
poetry run codespell --toml pyproject.toml
diff --git a/libs/partners/mistralai/Makefile b/libs/partners/mistralai/Makefile
index 0cb6563268..933e0be715 100644
--- a/libs/partners/mistralai/Makefile
+++ b/libs/partners/mistralai/Makefile
@@ -30,14 +30,13 @@ lint_tests: PYTHON_FILES=tests
lint_tests: MYPY_CACHE=.mypy_cache_test
lint lint_diff lint_package lint_tests:
- poetry run ruff check .
- poetry run ruff format $(PYTHON_FILES) --diff
- poetry run ruff check --select I $(PYTHON_FILES)
- mkdir $(MYPY_CACHE); poetry run mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff check $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff format $(PYTHON_FILES) --diff
+ [ "$(PYTHON_FILES)" = "" ] || mkdir -p $(MYPY_CACHE) && poetry run mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE)
format format_diff:
- poetry run ruff format $(PYTHON_FILES)
- poetry run ruff check --select I --fix $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff format $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff check --select I --fix $(PYTHON_FILES)
spell_check:
poetry run codespell --toml pyproject.toml
diff --git a/libs/partners/mongodb/Makefile b/libs/partners/mongodb/Makefile
index 2809ef4059..606ff36f4b 100644
--- a/libs/partners/mongodb/Makefile
+++ b/libs/partners/mongodb/Makefile
@@ -25,14 +25,13 @@ lint_tests: PYTHON_FILES=tests
lint_tests: MYPY_CACHE=.mypy_cache_test
lint lint_diff lint_package lint_tests:
- poetry run ruff check .
- poetry run ruff format $(PYTHON_FILES) --diff
- poetry run ruff check --select I $(PYTHON_FILES)
- mkdir $(MYPY_CACHE); poetry run mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff check $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff format $(PYTHON_FILES) --diff
+ [ "$(PYTHON_FILES)" = "" ] || mkdir -p $(MYPY_CACHE) && poetry run mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE)
format format_diff:
- poetry run ruff format $(PYTHON_FILES)
- poetry run ruff check --select I --fix $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff format $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff check --select I --fix $(PYTHON_FILES)
spell_check:
poetry run codespell --toml pyproject.toml
diff --git a/libs/partners/nomic/Makefile b/libs/partners/nomic/Makefile
index db9c3cfaee..d7f5f71aea 100644
--- a/libs/partners/nomic/Makefile
+++ b/libs/partners/nomic/Makefile
@@ -29,14 +29,13 @@ lint_tests: PYTHON_FILES=tests
lint_tests: MYPY_CACHE=.mypy_cache_test
lint lint_diff lint_package lint_tests:
- poetry run ruff .
- poetry run ruff format $(PYTHON_FILES) --diff
- poetry run ruff --select I $(PYTHON_FILES)
- mkdir $(MYPY_CACHE); poetry run mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff format $(PYTHON_FILES) --diff
+ [ "$(PYTHON_FILES)" = "" ] || mkdir -p $(MYPY_CACHE) && poetry run mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE)
format format_diff:
- poetry run ruff format $(PYTHON_FILES)
- poetry run ruff --select I --fix $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff format $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff --select I --fix $(PYTHON_FILES)
spell_check:
poetry run codespell --toml pyproject.toml
diff --git a/libs/partners/ollama/Makefile b/libs/partners/ollama/Makefile
index 0fb3aae37d..239375a21c 100644
--- a/libs/partners/ollama/Makefile
+++ b/libs/partners/ollama/Makefile
@@ -34,15 +34,13 @@ lint_tests: PYTHON_FILES=tests
lint_tests: MYPY_CACHE=.mypy_cache_test
lint lint_diff lint_package lint_tests:
- poetry run ruff .
- poetry run ruff format $(PYTHON_FILES) --diff
- poetry run ruff --select I $(PYTHON_FILES)
- mkdir -p $(MYPY_CACHE); poetry run mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff format $(PYTHON_FILES) --diff
+ [ "$(PYTHON_FILES)" = "" ] || mkdir -p $(MYPY_CACHE) && poetry run mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE)
format format_diff:
- poetry run ruff format $(PYTHON_FILES)
- poetry run ruff --select I --fix $(PYTHON_FILES)
-
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff format $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff --select I --fix $(PYTHON_FILES)
spell_check:
poetry run codespell --toml pyproject.toml
diff --git a/libs/partners/openai/Makefile b/libs/partners/openai/Makefile
index b1966ab339..69b2dfe885 100644
--- a/libs/partners/openai/Makefile
+++ b/libs/partners/openai/Makefile
@@ -26,14 +26,13 @@ lint_tests: PYTHON_FILES=tests
lint_tests: MYPY_CACHE=.mypy_cache_test
lint lint_diff lint_package lint_tests:
- poetry run ruff check .
- poetry run ruff format $(PYTHON_FILES) --diff
- poetry run ruff check --select I $(PYTHON_FILES)
- mkdir $(MYPY_CACHE); poetry run mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff check $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff format $(PYTHON_FILES) --diff
+ [ "$(PYTHON_FILES)" = "" ] || mkdir -p $(MYPY_CACHE) && poetry run mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE)
format format_diff:
- poetry run ruff format $(PYTHON_FILES)
- poetry run ruff check --select I --fix $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff format $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff check --select I --fix $(PYTHON_FILES)
spell_check:
poetry run codespell --toml pyproject.toml
diff --git a/libs/partners/pinecone/Makefile b/libs/partners/pinecone/Makefile
index 206bc11d56..add7932dd0 100644
--- a/libs/partners/pinecone/Makefile
+++ b/libs/partners/pinecone/Makefile
@@ -25,14 +25,13 @@ lint_tests: PYTHON_FILES=tests
lint_tests: MYPY_CACHE=.mypy_cache_test
lint lint_diff lint_package lint_tests:
- poetry run ruff check .
- poetry run ruff format $(PYTHON_FILES) --diff
- poetry run ruff check --select I $(PYTHON_FILES)
- mkdir $(MYPY_CACHE); poetry run mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff check $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff format $(PYTHON_FILES) --diff
+ [ "$(PYTHON_FILES)" = "" ] || mkdir -p $(MYPY_CACHE) && poetry run mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE)
format format_diff:
- poetry run ruff format $(PYTHON_FILES)
- poetry run ruff check --select I --fix $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff format $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff check --select I --fix $(PYTHON_FILES)
spell_check:
poetry run codespell --toml pyproject.toml
diff --git a/libs/partners/prompty/Makefile b/libs/partners/prompty/Makefile
index 38315d2b03..649b9bf479 100644
--- a/libs/partners/prompty/Makefile
+++ b/libs/partners/prompty/Makefile
@@ -27,14 +27,13 @@ lint_tests: PYTHON_FILES=tests
lint_tests: MYPY_CACHE=.mypy_cache_test
lint lint_diff lint_package lint_tests:
- poetry run ruff .
- poetry run ruff format $(PYTHON_FILES) --diff
- poetry run ruff --select I $(PYTHON_FILES)
- mkdir $(MYPY_CACHE); poetry run mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff format $(PYTHON_FILES) --diff
+ [ "$(PYTHON_FILES)" = "" ] || mkdir -p $(MYPY_CACHE) && poetry run mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE)
format format_diff:
- poetry run ruff format $(PYTHON_FILES)
- poetry run ruff --select I --fix $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff format $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff --select I --fix $(PYTHON_FILES)
spell_check:
poetry run codespell --toml pyproject.toml
diff --git a/libs/partners/qdrant/Makefile b/libs/partners/qdrant/Makefile
index 6edee7a9ee..e31881f5a4 100644
--- a/libs/partners/qdrant/Makefile
+++ b/libs/partners/qdrant/Makefile
@@ -26,14 +26,13 @@ lint_tests: PYTHON_FILES=tests
lint_tests: MYPY_CACHE=.mypy_cache_test
lint lint_diff lint_package lint_tests:
- poetry run ruff check .
- poetry run ruff format $(PYTHON_FILES) --diff
- poetry run ruff check --select I $(PYTHON_FILES)
- mkdir $(MYPY_CACHE); poetry run mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff check $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff format $(PYTHON_FILES) --diff
+ [ "$(PYTHON_FILES)" = "" ] || mkdir -p $(MYPY_CACHE) && poetry run mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE)
format format_diff:
- poetry run ruff format $(PYTHON_FILES)
- poetry run ruff check --select I --fix $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff format $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff check --select I --fix $(PYTHON_FILES)
spell_check:
poetry run codespell --toml pyproject.toml
diff --git a/libs/partners/robocorp/Makefile b/libs/partners/robocorp/Makefile
index 3e88c9f7b0..fac650e5f3 100644
--- a/libs/partners/robocorp/Makefile
+++ b/libs/partners/robocorp/Makefile
@@ -25,14 +25,13 @@ lint_tests: PYTHON_FILES=tests
lint_tests: MYPY_CACHE=.mypy_cache_test
lint lint_diff lint_package lint_tests:
- poetry run ruff check .
- poetry run ruff format $(PYTHON_FILES) --diff
- poetry run ruff check --select I $(PYTHON_FILES)
- mkdir $(MYPY_CACHE); poetry run mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff check $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff format $(PYTHON_FILES) --diff
+ [ "$(PYTHON_FILES)" = "" ] || mkdir -p $(MYPY_CACHE) && poetry run mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE)
format format_diff:
- poetry run ruff format $(PYTHON_FILES)
- poetry run ruff check --select I --fix $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff format $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff check --select I --fix $(PYTHON_FILES)
spell_check:
poetry run codespell --toml pyproject.toml
diff --git a/libs/partners/together/Makefile b/libs/partners/together/Makefile
index e11de53ca3..c2a1173ca0 100644
--- a/libs/partners/together/Makefile
+++ b/libs/partners/together/Makefile
@@ -25,14 +25,13 @@ lint_tests: PYTHON_FILES=tests
lint_tests: MYPY_CACHE=.mypy_cache_test
lint lint_diff lint_package lint_tests:
- poetry run ruff check .
- poetry run ruff format $(PYTHON_FILES) --diff
- poetry run ruff check --select I $(PYTHON_FILES)
- mkdir $(MYPY_CACHE); poetry run mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff check $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff format $(PYTHON_FILES) --diff
+ [ "$(PYTHON_FILES)" = "" ] || mkdir -p $(MYPY_CACHE) && poetry run mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE)
format format_diff:
- poetry run ruff format $(PYTHON_FILES)
- poetry run ruff check --select I --fix $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff format $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff check --select I --fix $(PYTHON_FILES)
spell_check:
poetry run codespell --toml pyproject.toml
diff --git a/libs/partners/voyageai/Makefile b/libs/partners/voyageai/Makefile
index 4937a01cac..f0e6f96ea6 100644
--- a/libs/partners/voyageai/Makefile
+++ b/libs/partners/voyageai/Makefile
@@ -25,14 +25,13 @@ lint_tests: PYTHON_FILES=tests
lint_tests: MYPY_CACHE=.mypy_cache_test
lint lint_diff lint_package lint_tests:
- poetry run ruff .
- poetry run ruff format $(PYTHON_FILES) --diff
- poetry run ruff --select I $(PYTHON_FILES)
- mkdir $(MYPY_CACHE); poetry run mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff format $(PYTHON_FILES) --diff
+ [ "$(PYTHON_FILES)" = "" ] || mkdir -p $(MYPY_CACHE) && poetry run mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE)
format format_diff:
- poetry run ruff format $(PYTHON_FILES)
- poetry run ruff --select I --fix $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff format $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff --select I --fix $(PYTHON_FILES)
spell_check:
poetry run codespell --toml pyproject.toml
diff --git a/libs/standard-tests/Makefile b/libs/standard-tests/Makefile
index f55907f954..da9f713962 100644
--- a/libs/standard-tests/Makefile
+++ b/libs/standard-tests/Makefile
@@ -30,14 +30,13 @@ lint_tests: PYTHON_FILES=tests
lint_tests: MYPY_CACHE=.mypy_cache_test
lint lint_diff lint_package lint_tests:
- poetry run ruff .
- poetry run ruff format $(PYTHON_FILES) --diff
- poetry run ruff --select I $(PYTHON_FILES)
- mkdir $(MYPY_CACHE); poetry run mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff format $(PYTHON_FILES) --diff
+ [ "$(PYTHON_FILES)" = "" ] || mkdir -p $(MYPY_CACHE) && poetry run mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE)
format format_diff:
- poetry run ruff format $(PYTHON_FILES)
- poetry run ruff --select I --fix $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff format $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff --select I --fix $(PYTHON_FILES)
spell_check:
poetry run codespell --toml pyproject.toml
diff --git a/libs/text-splitters/Makefile b/libs/text-splitters/Makefile
index 1a338080c9..f141777e36 100644
--- a/libs/text-splitters/Makefile
+++ b/libs/text-splitters/Makefile
@@ -41,15 +41,13 @@ lint_tests: MYPY_CACHE=.mypy_cache_test
lint lint_diff lint_package lint_tests:
./scripts/check_pydantic.sh .
./scripts/lint_imports.sh
- poetry run ruff check .
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff check $(PYTHON_FILES)
[ "$(PYTHON_FILES)" = "" ] || poetry run ruff format $(PYTHON_FILES) --diff
- [ "$(PYTHON_FILES)" = "" ] || poetry run ruff check --select I $(PYTHON_FILES)
- [ "$(PYTHON_FILES)" = "" ] || poetry run mypy $(PYTHON_FILES)
[ "$(PYTHON_FILES)" = "" ] || mkdir -p $(MYPY_CACHE) && poetry run mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE)
format format_diff:
- poetry run ruff format $(PYTHON_FILES)
- poetry run ruff check --select I --fix $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff format $(PYTHON_FILES)
+ [ "$(PYTHON_FILES)" = "" ] || poetry run ruff check --select I --fix $(PYTHON_FILES)
spell_check:
poetry run codespell --toml pyproject.toml