chore: enforce ruff docstring rules in first 10 integrations#3008
Merged
julian-risch merged 1 commit intomainfrom Mar 23, 2026
Merged
chore: enforce ruff docstring rules in first 10 integrations#3008julian-risch merged 1 commit intomainfrom
julian-risch merged 1 commit intomainfrom
Conversation
…19) in first 10 integrations Enable ruff pydocstyle rules matching haystack-ai main repo config for: aimlapi, amazon_bedrock, anthropic, arcadedb, astra, azure_ai_search, azure_doc_intelligence, chroma, cohere, cometapi, and the pyproject.toml template. - Add D102, D103, D205, D209, D213, D417, D419 to ruff select in each pyproject.toml - Ignore D rules in tests/** per-file-ignores - Fix all resulting docstring violations (missing docstrings, blank line between summary and description) Closes #2947 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This was referenced Mar 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related Issues
Part 1/5 of of #2947
Proposed Changes:
Enable ruff pydocstyle rules matching
haystack-aimain repo config for the first 10 integrations (aimlapi, amazon_bedrock, anthropic, arcadedb, astra, azure_ai_search, azure_doc_intelligence, chroma, cohere, cometapi) and thepyproject.tomltemplate.[tool.ruff.lint] selectin each integration'spyproject.toml:D102– Missing docstring in public methodD103– Missing docstring in public functionD205– 1 blank line required between summary line and descriptionD209– Closing triple quotes go to new lineD213– Summary lines must be positioned on the second physical line of the docstringD417– Missing argument descriptions in the docstringD419– Docstring is empty"D"totests/**/*per-file-ignores so test files are exemptpyproject.tomltemplate to include the same rulesHow did you test it?
hatch run fmtandhatch run fmt-checkin each integration directoryhatch run test:typesin each integration directory – all passhatch run test:unitin each integration directory – all passNotes for the reviewer
This is the first batch of 10 integrations. Remaining integrations will follow in subsequent PRs.
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
fix:,feat:,build:,chore:,ci:,docs:,style:,refactor:,perf:,test:.