Skip to content

chore: enforce ruff docstring rules in integrations 21-30 (langfuse, lara, llama_cpp, llama_stack, mcp, meta_llama, mistral, mongodb_atlas, nvidia, ollama)#3010

Merged
julian-risch merged 1 commit intomainfrom
feat/docstring-ruff-rules-batch3
Mar 23, 2026
Merged

chore: enforce ruff docstring rules in integrations 21-30 (langfuse, lara, llama_cpp, llama_stack, mcp, meta_llama, mistral, mongodb_atlas, nvidia, ollama)#3010
julian-risch merged 1 commit intomainfrom
feat/docstring-ruff-rules-batch3

Conversation

@julian-risch
Copy link
Copy Markdown
Member

@julian-risch julian-risch commented Mar 20, 2026

Related Issues

Part 3/5 of #2947

Proposed Changes:

  • Adds ruff pydocstyle rules D102, D103, D205, D209, D213, D417, D419 to pyproject.toml for 10 integrations: langfuse, lara, llama_cpp, llama_stack, mcp, meta_llama, mistral, mongodb_atlas, nvidia, ollama
  • Fixes all resulting docstring violations (D205 — blank line between summary and description; D102 — missing docstrings on public methods)
  • D213/D209 violations were auto-fixed by ruff --fix; D205/D102 violations fixed manually
  • Added "D" to examples/** per-file-ignores for langfuse and mcp (example files don't need docstrings)

How did you test it?

Ran tests locally

Notes for the reviewer

This is batch 3 of the docstring rules enforcement. Batch 1 (aimlapi through cometapi) was #3008, batch 2 (deepeval through kreuzberg) was #3009.

I thought about adding D107, which is not mentioned in the issue. D107 checks that __init__ method definitions have docstrings. I could open one separate PR that adds D107 to all integrations and one PR to add it to Haystack if we agree its beneficial. For consistency it makes sense but there is not much value added but the __init__ docstrings so it's not of importance.

The failing Nvidia tests are unrelated and I wouldn't block this PR because of them.

Checklist

…19) in integrations 21-30

Adds D102, D103, D205, D209, D213, D417, D419 ruff rules to pyproject.toml
for: langfuse, lara, llama_cpp, llama_stack, mcp, meta_llama, mistral,
mongodb_atlas, nvidia, ollama. Fixes all resulting docstring violations.

Part of #2947

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Member

@anakin87 anakin87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@julian-risch julian-risch merged commit 2093503 into main Mar 23, 2026
62 of 65 checks passed
@julian-risch julian-risch deleted the feat/docstring-ruff-rules-batch3 branch March 23, 2026 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants