Skip to content

Commit

Permalink
Use ruff for both linting and formatting in langchain-cli. (langc…
Browse files Browse the repository at this point in the history
…hain-ai#12672)

Prior to this PR, `ruff` was used only for linting and not for
formatting, despite the names of the commands. This PR makes it be used
for both linting code and autoformatting it.
  • Loading branch information
obi1kenobi authored and HoaNQ9 committed Feb 2, 2024
1 parent e384f1b commit 96e41f1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions libs/cli/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,13 @@ select = [
[tool.poe.tasks]
test = "poetry run pytest"
watch = "poetry run ptw"
lint = "poetry run ruff ."
format = "poetry run ruff . --fix"
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"]
Expand Down

0 comments on commit 96e41f1

Please sign in to comment.