Reconcile three validate/repair rule conflicts from the qh sweep - #32
Merged
Merged
Conversation
#31) - normalizer.blank_lines_between_blocks no longer inserts a blank line between a Google section header and its immediate doctest/list body: napoleon renders both identically, so the blank line only existed to trip ruff's D412 that repair itself had just satisfied. - pydoclint's --arg-type-hints-in-signature is now true, matching the house convention (types live in the signature): the false value told pydoclint to expect NO type hints there, so DOC108 fired on every annotated function. - ruff's D107 (every __init__ needs a docstring) is dropped from the selection: it is the mirror image of pydoclint's DOC301 default (__init__ must not have one, Args merge into the class docstring), which is the convention epythet-docstring-style already documents. Confirmed via docutils/napoleon doctree inspection that the D412 blank line changes nothing about how Sphinx renders the section.
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.
[session-link-guard] stripped Claude-Session link(s) from the PR body -- this repo is public (or its visibility could not be confirmed)
Summary
Closes #31. Three validate/repair rule pairs that were mutually exclusive in practice, surfaced by the
qhdocs sweep:D412vsrepair's own output:repairinserted a blank line after a Google section header (Examples:) immediately before its doctest/list, to satisfyDR003/DR008— but ruff'sD412then flagged that same blank line. Confirmed vianapoleon/docutilsdoctree inspection that Sphinx renders the section identically with or without the blank line, sonormalizer.blank_lines_between_blocksno longer inserts one when the preceding line is the section's own header.DOC108firing on every annotated signature:PYDOCLINT_OPTIONShad--arg-type-hints-in-signature false, which tells pydoclint to expect no type hints in the signature — the opposite of the house convention (types in annotations). Flipped totrue.D107vsDOC301over__init__docs: kept pydoclint'sDOC301default (__init__undocumented, itsArgsmerged into the class docstring — already the convention documented inepythet-docstring-style), and dropped ruff'sD107from the selection since it demands the opposite.Changes
epythet/normalizer.py:blank_lines_between_blocksskips a block that sits directly under its own section header.epythet/validation/lint.py:--arg-type-hints-in-signature true; newRUFF_D_IGNORE = ("D107",)passed via--ignore.epythet/data/skills/epythet-docstring-style/SKILL.md: clarifies the__init__convention and whyD107is dropped.tests/test_lint_conflicts.py: one fixture module per conflict, repaired then validated at level 0 with 0 findings.tests/normalizer_fixtures/section_header_then_{doctest,list}_untouched.{in,out}: pin the new normalizer behavior.Test plan
pytest tests/ -v— 568 passedepythet validate . --level 0dogfooded on this repo — no new findings