Skip to content

Commit

Permalink
langchain: clean pyproject ruff section (#30070)
Browse files Browse the repository at this point in the history
## Changes
- `/Makefile` - added extra step to `make format` and `make lint` to
ensure the lint dep-group is installed before running ruff (documented
in issue #30069)

- `/pyproject.toml` - removed ruff exceptions for files that no longer
exist or no longer create formatting/linting errors in ruff

## Testing

**running `make format` on this branch/PR**
<img width="435" alt="image"
src="https://github.com/user-attachments/assets/82751788-f44e-4591-98ed-95ce893ce623"
/>

## Issue

fixes #30069

---------

Co-authored-by: Chester Curme <[email protected]>
  • Loading branch information
dskarbrevik and ccurme authored Mar 9, 2025
1 parent 911accf commit 0d7cdf2
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 30 deletions.
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

.EXPORT_ALL_VARIABLES:
UV_FROZEN = true
UV_NO_SYNC = true

## help: Show this help info.
help: Makefile
Expand Down
10 changes: 1 addition & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,6 @@ ignore-words-list = 'momento,collison,ned,foor,reworkd,parth,whats,aapply,mysogy

[tool.ruff]
extend-include = ["*.ipynb"]
extend-exclude = [
"docs/docs/expression_language/why.ipynb", # TODO: look into why linter errors
]

[tool.ruff.lint]
select = ["D"]
Expand All @@ -96,9 +93,4 @@ pydocstyle = { convention = "google" }
"F841", # allow assignments to variables that are never read -- it's example code

]
"!libs/langchain/langchain/model_laboratory.py" = ["D"]

# These files were failing the listed rules at the time ruff was adopted for notebooks.
# Don't require them to change at once, though we should look into them eventually.
"cookbook/gymnasium_agent_simulation.ipynb" = ["F821"]
"docs/docs/integrations/document_loaders/tensorflow_datasets.ipynb" = ["F821"]
"!libs/langchain/langchain/model_laboratory.py" = ["D"]
36 changes: 16 additions & 20 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0d7cdf2

Please sign in to comment.