mirror of
https://github.com/hwchase17/langchain
synced 2024-11-13 19:10:52 +00:00
24c0bab57b
## 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>
64 lines
1.2 KiB
TOML
64 lines
1.2 KiB
TOML
[tool.poetry]
|
|
name = "templates"
|
|
version = "0.0.0"
|
|
description = ""
|
|
authors = []
|
|
readme = "README.md"
|
|
|
|
[tool.poetry.dependencies]
|
|
python = "^3.10"
|
|
|
|
|
|
# dev, test, lint, typing
|
|
langchain = ">=0.0.353,<0.2"
|
|
|
|
[tool.poetry.group.dev]
|
|
optional = true
|
|
|
|
[tool.poetry.group.dev.dependencies]
|
|
poethepoet = "^0.24.1"
|
|
pytest-watch = "^4.2.0"
|
|
langchain-cli = ">=0.0.21"
|
|
|
|
[tool.poetry.group.test]
|
|
optional = true
|
|
|
|
[tool.poetry.group.test.dependencies]
|
|
pytest = "^7.4.3"
|
|
|
|
[tool.poetry.group.lint]
|
|
optional = true
|
|
|
|
[tool.poetry.group.lint.dependencies]
|
|
poethepoet = "^0.24.1"
|
|
ruff = "^0.1.3"
|
|
langchain = { path = "../libs/langchain", develop = true }
|
|
langchain-core = { path = "../libs/core", develop = true }
|
|
|
|
[tool.poetry.group.typing]
|
|
optional = true
|
|
|
|
[tool.poetry.group.typing.dependencies]
|
|
|
|
[tool.ruff.lint]
|
|
select = [
|
|
"E", # pycodestyle
|
|
"F", # pyflakes
|
|
"I", # isort
|
|
]
|
|
|
|
[tool.poe.tasks]
|
|
test = "poetry run pytest"
|
|
watch = "poetry run ptw"
|
|
lint = ["_lint", "_check_formatting"]
|
|
format = ["_lint_fix", "_format"]
|
|
|
|
_check_formatting = "poetry run ruff format . --diff"
|
|
_lint = "poetry run ruff ."
|
|
_format = "poetry run ruff format ."
|
|
_lint_fix = "poetry run ruff . --fix"
|
|
|
|
[build-system]
|
|
requires = ["poetry-core"]
|
|
build-backend = "poetry.core.masonry.api"
|