Description
Issue #387 revealed that _is_stub_function() diverged from ruff's is_stub() without documenting the divergence. Party-mode research session (2026-03-23) uncovered several additional gaps in stub/interface detection.
This issue tracks a broader audit: every enrichment rule should be grounded against its authoritative source (PEP, ruff rule, Google style guide) with a documented truth table of expected behavior.
Motivation
docvet positions itself as going beyond ruff's D rules. But undocumented divergence from ruff is perceived as a bug by users who use both tools. We need to explicitly state where we align, where we diverge, and why.
Scope
For each enrichment rule, document:
- Authority: Which PEP, ruff rule, or style guide defines the expected behavior?
- Skip conditions: What decorators, body patterns, or class contexts should suppress the rule? Compare against ruff's implementation.
- Truth table: A matrix of inputs (body patterns, decorators, class types) vs expected output (finding / no finding).
- Divergences: Any intentional differences from ruff, with rationale.
Specific areas to audit (from party-mode research)
Deliverable
A reference document (e.g., docs/rule-authority-matrix.md) mapping every rule to its grounding sources, plus any code fixes for identified gaps.
Related issues
Description
Issue #387 revealed that
_is_stub_function()diverged from ruff'sis_stub()without documenting the divergence. Party-mode research session (2026-03-23) uncovered several additional gaps in stub/interface detection.This issue tracks a broader audit: every enrichment rule should be grounded against its authoritative source (PEP, ruff rule, Google style guide) with a documented truth table of expected behavior.
Motivation
docvet positions itself as going beyond ruff's D rules. But undocumented divergence from ruff is perceived as a bug by users who use both tools. We need to explicitly state where we align, where we diverge, and why.
Scope
For each enrichment rule, document:
Specific areas to audit (from party-mode research)
_should_skip_reverse_check@typing.override(PEP 698): Google style says overriding methods with@overridedon't need docstrings — do we handle this?raise NotImplemented(without Error): ruff accepts both; we only acceptNotImplementedErrortyping.TYPE_CHECKINGblock functions: effectively stubs, not currently detectedDeliverable
A reference document (e.g.,
docs/rule-authority-matrix.md) mapping every rule to its grounding sources, plus any code fixes for identified gaps.Related issues