infra, multiple: Upgrade configuration for Ruff v0.2.0 (#16905)

## Summary

This PR upgrades LangChain's Ruff configuration in preparation for
Ruff's v0.2.0 release. (The changes are compatible with Ruff v0.1.5,
which LangChain uses today.) Specifically, we're now warning when
linter-only options are specified under `[tool.ruff]` instead of
`[tool.ruff.lint]`.

---------

Co-authored-by: Erick Friis <erick@langchain.dev>
Co-authored-by: Bagatur <baskaryan@gmail.com>
pull/17346/head
Charlie Marsh 3 months ago committed by GitHub
parent 01409add5a
commit 24c0bab57b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -208,7 +208,7 @@
}
],
"source": [
"system = f\"\"\"Return the names of the SQL tables that are relevant to the user question. \\\n",
"system = \"\"\"Return the names of the SQL tables that are relevant to the user question. \\\n",
"The tables are:\n",
"\n",
"Music\n",

@ -53,7 +53,7 @@ optional = true
[tool.poetry.group.dev.dependencies]
langchain-core = {path = "../../core", develop = true}
[tool.ruff]
[tool.ruff.lint]
select = [
"E", # pycodestyle
"F", # pyflakes

@ -40,7 +40,7 @@ ruff = "^0.1.5"
# For langserve
serve = []
[tool.ruff]
[tool.ruff.lint]
select = [
"E", # pycodestyle
"F", # pyflakes

@ -260,15 +260,17 @@ extended_testing = [
]
[tool.ruff]
exclude = [
"tests/examples/non-utf8-encoding.py",
"tests/integration_tests/examples/non-utf8-encoding.py",
]
[tool.ruff.lint]
select = [
"E", # pycodestyle
"F", # pyflakes
"I", # isort
]
exclude = [
"tests/examples/non-utf8-encoding.py",
"tests/integration_tests/examples/non-utf8-encoding.py",
]
[tool.mypy]
ignore_missing_imports = "True"

@ -66,7 +66,7 @@ dependencies = {}
[tool.poetry.extras]
extended_testing = ["jinja2"]
[tool.ruff]
[tool.ruff.lint]
select = [
"E", # pycodestyle
"F", # pyflakes

@ -81,7 +81,7 @@ extended_testing = [
"jinja2",
]
[tool.ruff]
[tool.ruff.lint]
select = [
"E", # pycodestyle
"F", # pyflakes

@ -301,14 +301,16 @@ extended_testing = [
]
[tool.ruff]
exclude = [
"tests/integration_tests/examples/non-utf8-encoding.py",
]
[tool.ruff.lint]
select = [
"E", # pycodestyle
"F", # pyflakes
"I", # isort
]
exclude = [
"tests/integration_tests/examples/non-utf8-encoding.py",
]
[tool.mypy]
ignore_missing_imports = "True"

@ -55,7 +55,7 @@ optional = true
[tool.poetry.group.test_integration.dependencies]
langchain-core = {path = "../../core", develop = true}
[tool.ruff]
[tool.ruff.lint]
select = [
"E", # pycodestyle
"F", # pyflakes

@ -55,7 +55,7 @@ optional = true
[tool.poetry.group.test_integration.dependencies]
[tool.ruff]
[tool.ruff.lint]
select = [
"E", # pycodestyle
"F", # pyflakes

@ -68,7 +68,7 @@ types-requests = "^2.31.0.10"
types-pillow = "^10.1.0.2"
types-google-cloud-ndb = "^2.2.0.1"
[tool.ruff]
[tool.ruff.lint]
select = [
"E", # pycodestyle
"F", # pyflakes

@ -62,7 +62,7 @@ optional = true
[tool.poetry.group.dev.dependencies]
langchain-core = { path = "../../core", develop = true }
[tool.ruff]
[tool.ruff.lint]
select = [
"E", # pycodestyle
"F", # pyflakes

@ -51,7 +51,7 @@ optional = true
[tool.poetry.group.dev.dependencies]
langchain-core = {path = "../../core", develop = true}
[tool.ruff]
[tool.ruff.lint]
select = [
"E", # pycodestyle
"F", # pyflakes

@ -54,7 +54,7 @@ optional = true
[tool.poetry.group.dev.dependencies]
langchain-core = {path = "../../core", develop = true}
[tool.ruff]
[tool.ruff.lint]
select = [
"E", # pycodestyle
"F", # pyflakes

@ -56,7 +56,7 @@ optional = true
[tool.poetry.group.dev.dependencies]
langchain-core = { path = "../../core", develop = true }
[tool.ruff]
[tool.ruff.lint]
select = [
"E", # pycodestyle
"F", # pyflakes

@ -57,7 +57,7 @@ optional = true
[tool.poetry.group.dev.dependencies]
langchain-core = { path = "../../core", develop = true }
[tool.ruff]
[tool.ruff.lint]
select = [
"E", # pycodestyle
"F", # pyflakes

@ -57,7 +57,7 @@ optional = true
[tool.poetry.group.dev.dependencies]
langchain-core = {path = "../../core", develop = true}
[tool.ruff]
[tool.ruff.lint]
select = [
"E", # pycodestyle
"F", # pyflakes

@ -56,7 +56,7 @@ optional = true
[tool.poetry.group.dev.dependencies]
langchain-core = {path = "../../core", develop = true}
[tool.ruff]
[tool.ruff.lint]
select = [
"E", # pycodestyle
"F", # pyflakes

@ -57,7 +57,7 @@ optional = true
[tool.poetry.group.dev.dependencies]
langchain-core = {path = "../../core", develop = true}
[tool.ruff]
[tool.ruff.lint]
select = [
"E", # pycodestyle
"F", # pyflakes

@ -40,7 +40,7 @@ optional = true
[tool.poetry.group.typing.dependencies]
[tool.ruff]
[tool.ruff.lint]
select = [
"E", # pycodestyle
"F", # pyflakes

Loading…
Cancel
Save