Skip to content

Commit 706a66e

Browse files
authored
fix: automatically fix issues with ruff (#31897)
* Perform safe automatic fixes instead of only selecting [isort](https://docs.astral.sh/ruff/rules/#isort-i)
1 parent e686a70 commit 706a66e

File tree

21 files changed

+24
-23
lines changed

21 files changed

+24
-23
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ spell_fix:
7171
lint lint_package lint_tests:
7272
uv run --group lint ruff check docs cookbook
7373
uv run --group lint ruff format docs cookbook cookbook --diff
74-
uv run --group lint ruff check --select I docs cookbook
74+
uv run --group lint ruff check docs cookbook
7575
git --no-pager grep 'from langchain import' docs cookbook | grep -vE 'from langchain import (hub)' && echo "Error: no importing langchain from root in docs, except for hub" && exit 1 || exit 0
7676

7777
git --no-pager grep 'api.python.langchain.com' -- docs/docs ':!docs/docs/additional_resources/arxiv_references.mdx' ':!docs/docs/integrations/document_loaders/sitemap.ipynb' || exit 0 && \
@@ -81,7 +81,7 @@ lint lint_package lint_tests:
8181
## format: Format the project files.
8282
format format_diff:
8383
uv run --group lint ruff format docs cookbook
84-
uv run --group lint ruff check --select I --fix docs cookbook
84+
uv run --group lint ruff check --fix docs cookbook
8585

8686
update-package-downloads:
8787
uv run python docs/scripts/packages_yml_get_downloads.py

libs/cli/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ lint lint_diff lint_package lint_tests:
2222

2323
format format_diff:
2424
[ "$(PYTHON_FILES)" = "" ] || uv run --group typing --group lint ruff format $(PYTHON_FILES)
25-
[ "$(PYTHON_FILES)" = "" ] || uv run --group typing --group lint ruff check --select I --fix $(PYTHON_FILES)
25+
[ "$(PYTHON_FILES)" = "" ] || uv run --group typing --group lint ruff check --fix $(PYTHON_FILES)
2626

2727
test tests: _test _e2e_test
2828

libs/langchain/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ lint lint_diff lint_package lint_tests:
6464

6565
format format_diff:
6666
[ "$(PYTHON_FILES)" = "" ] || uv run --all-groups ruff format $(PYTHON_FILES)
67-
[ "$(PYTHON_FILES)" = "" ] || uv run --all-groups ruff check --select I --fix $(PYTHON_FILES)
67+
[ "$(PYTHON_FILES)" = "" ] || uv run --all-groups ruff check --fix $(PYTHON_FILES)
6868

6969
spell_check:
7070
uv run --all-groups codespell --toml pyproject.toml

libs/partners/anthropic/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ lint lint_diff lint_package lint_tests:
4343

4444
format format_diff:
4545
[ "$(PYTHON_FILES)" = "" ] || uv run --all-groups ruff format $(PYTHON_FILES)
46-
[ "$(PYTHON_FILES)" = "" ] || uv run --all-groups ruff check --select I --fix $(PYTHON_FILES)
46+
[ "$(PYTHON_FILES)" = "" ] || uv run --all-groups ruff check --fix $(PYTHON_FILES)
4747

4848
spell_check:
4949
uv run --all-groups codespell --toml pyproject.toml

libs/partners/chroma/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ lint lint_diff lint_package lint_tests:
4141

4242
format format_diff:
4343
[ "$(PYTHON_FILES)" = "" ] || uv run --all-groups ruff format $(PYTHON_FILES)
44-
[ "$(PYTHON_FILES)" = "" ] || uv run --all-groups ruff check --select I --fix $(PYTHON_FILES)
44+
[ "$(PYTHON_FILES)" = "" ] || uv run --all-groups ruff check --fix $(PYTHON_FILES)
4545

4646
spell_check:
4747
uv run --all-groups codespell --toml pyproject.toml

libs/partners/deepseek/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ lint lint_diff lint_package lint_tests:
4242

4343
format format_diff:
4444
[ "$(PYTHON_FILES)" = "" ] || uv run --all-groups ruff format $(PYTHON_FILES)
45-
[ "$(PYTHON_FILES)" = "" ] || uv run --all-groups ruff check --select I --fix $(PYTHON_FILES)
45+
[ "$(PYTHON_FILES)" = "" ] || uv run --all-groups ruff check --fix $(PYTHON_FILES)
4646

4747
spell_check:
4848
uv run --all-groups codespell --toml pyproject.toml

libs/partners/exa/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ lint lint_diff lint_package lint_tests:
4141

4242
format format_diff:
4343
[ "$(PYTHON_FILES)" = "" ] || uv run --all-groups ruff format $(PYTHON_FILES)
44-
[ "$(PYTHON_FILES)" = "" ] || uv run --all-groups ruff check --select I --fix $(PYTHON_FILES)
44+
[ "$(PYTHON_FILES)" = "" ] || uv run --all-groups ruff check --fix $(PYTHON_FILES)
4545

4646
spell_check:
4747
uv run --all-groups codespell --toml pyproject.toml

libs/partners/fireworks/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ lint lint_diff lint_package lint_tests:
4040

4141
format format_diff:
4242
[ "$(PYTHON_FILES)" = "" ] || uv run --all-groups ruff format $(PYTHON_FILES)
43-
[ "$(PYTHON_FILES)" = "" ] || uv run --all-groups ruff check --select I --fix $(PYTHON_FILES)
43+
[ "$(PYTHON_FILES)" = "" ] || uv run --all-groups ruff check --fix $(PYTHON_FILES)
4444

4545
spell_check:
4646
uv run --all-groups codespell --toml pyproject.toml

libs/partners/groq/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ lint lint_diff lint_package lint_tests:
4141

4242
format format_diff:
4343
[ "$(PYTHON_FILES)" = "" ] || uv run --all-groups ruff format $(PYTHON_FILES)
44-
[ "$(PYTHON_FILES)" = "" ] || uv run --all-groups ruff check --select I --fix $(PYTHON_FILES)
44+
[ "$(PYTHON_FILES)" = "" ] || uv run --all-groups ruff check --fix $(PYTHON_FILES)
4545

4646
spell_check:
4747
uv run --all-groups codespell --toml pyproject.toml

libs/partners/huggingface/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ lint lint_diff lint_package lint_tests:
4141

4242
format format_diff:
4343
[ "$(PYTHON_FILES)" = "" ] || uv run --all-groups ruff format $(PYTHON_FILES)
44-
[ "$(PYTHON_FILES)" = "" ] || uv run --all-groups ruff check --select I --fix $(PYTHON_FILES)
44+
[ "$(PYTHON_FILES)" = "" ] || uv run --all-groups ruff check --fix $(PYTHON_FILES)
4545

4646
spell_check:
4747
uv run --all-groups codespell --toml pyproject.toml

0 commit comments

Comments
 (0)