Skip to content

chore: enforce ruff docstring rules in integrations 41-47 (stackit, togetherai, unstructured, valkey, watsonx, weave, weaviate)#3012

Merged
julian-risch merged 2 commits intomainfrom
feat/docstring-ruff-rules-batch5
Mar 24, 2026
Merged

chore: enforce ruff docstring rules in integrations 41-47 (stackit, togetherai, unstructured, valkey, watsonx, weave, weaviate)#3012
julian-risch merged 2 commits intomainfrom
feat/docstring-ruff-rules-batch5

Conversation

@julian-risch
Copy link
Copy Markdown
Member

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

Related Issues

Part 5/5 of #2947

Proposed Changes:

  • Adds ruff pydocstyle rules D102, D103, D205, D209, D213, D417, D419 to pyproject.toml for 7 integrations: stackit, togetherai, unstructured, valkey, watsonx, weave, weaviate
  • Fixes all resulting docstring violations (D205 — blank line between summary and description; D102/D103 — missing docstrings on public methods/functions)
  • D213/D209 violations were auto-fixed by ruff --fix; D205/D102/D103 violations fixed manually
  • Added "D" to examples/** / example/** per-file-ignores where those directories exist
  • watsonx needed no source code changes (only pyproject.toml)

How did you test it?

Ran for each integration:

  • hatch run fmt-check — all pass
  • hatch run test:types — all pass (pre-existing mypy errors in stackit and watsonx are unrelated to docstrings)
  • hatch run test:unit — all pass

Notes for the reviewer

This is batch 5 (final) of the docstring rules enforcement. Previous batches: #3008, #3009, #3010, #3011.

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.

Checklist

…19) in integrations 41-47

Adds D102, D103, D205, D209, D213, D417, D419 ruff rules to pyproject.toml
for: stackit, togetherai, unstructured, valkey, watsonx, weave, weaviate.
Fixes all resulting docstring violations.

Part of #2947

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@julian-risch julian-risch marked this pull request as ready for review March 20, 2026 21:22
@julian-risch julian-risch requested a review from a team as a code owner March 20, 2026 21:22
@julian-risch julian-risch requested review from bogdankostic and removed request for a team March 20, 2026 21:22
@julian-risch julian-risch enabled auto-merge (squash) March 23, 2026 08:08
Copy link
Copy Markdown
Contributor

@bogdankostic bogdankostic left a comment

Choose a reason for hiding this comment

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

Looking good in principle, just found one docstring where we should remove the default model from.

Removed default model documentation from TogetherAIChatGenerator.
@julian-risch julian-risch merged commit 277d123 into main Mar 24, 2026
42 checks passed
@julian-risch julian-risch deleted the feat/docstring-ruff-rules-batch5 branch March 24, 2026 09:17
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