Repository navigation
chore: gate docstring coverage at 100% with interrogate - #93
Merged
Merged
Conversation
Adds [tool.interrogate] to collector/pyproject.toml (fail-under = 100, exempting __init__, dunders and nested functions) and the interrogate hook, pointed at that table, to .pre-commit-config.yaml so CI enforces it. Writes the 47 docstrings the package was missing to get there from 76.2%. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Adds docstring coverage as a gate, at 100%.
[tool.interrogate]incollector/pyproject.tomlfail-under = 100__init__(the class docstring covers it), dunder methods, and nested functions (the per-repo closures handed to a thread pool, which their enclosing function documents).The hook.
.pre-commit-config.yamlused to leave interrogate out until this table existed. It now runs interrogate 1.7.0 with--config collector/pyproject.tomlover the whole package (pass_filenames: false, becausefail-underis a share of everything, not of the files a commit touches). The hooks workflow runs it in CI. I updated that config's header comment to match.The docstrings. Coverage under these exemptions was 76.2%, and this adds the 47 docstrings that were missing. The largest share was the small
_add_*exposition helpers inmetrics.py(16), then theGitHub/GitLabclients,Store, and theRemoteSourceProtocol stubs. Each one was written after reading the function, and none changes code.Verified
prek run --all-files: all hooks pass, including the newinterrogate(100.0%).mypy(strict) is clean, including the Protocol methods whose bodies are now docstrings rather than....pytest: 477 passed, 100% of lines and branches.🤖 Generated with Claude Code