langchain-ai / langchain

🦜🔗 Build context-aware reasoning applications
https://python.langchain.com
MIT License
88.76k stars 13.96k forks source link

Add docstring linting to core, langchain, partner packages #23188

Open baskaryan opened 2 weeks ago

baskaryan commented 2 weeks ago

Privileged issue

Issue Content

We want to add docstring linting to langchain-core, langchain, langchain-text-splitters, and partner packages. This requires adding this to each pacakages pyproject.toml

[tool.ruff.lint]
select = [
  ...
  "D",    # pydocstyle
]

[tool.ruff.lint.pydocstyle]
convention = "google"

[tool.ruff.per-file-ignores]
"tests/**" = ["D"]  # ignore docstring checks for tests

this will likely cause a number of new linting errors which then need to be fixed. there should be a separate pr for each package. here's a reference for langchain-openai (linting errors have not yet been fixed) https://github.com/langchain-ai/langchain/pull/23187

wenngong commented 2 weeks ago

@baskaryan please review this pr:#23249