Repository navigation
v0.7.39 - a verdict that names nothing
Nine checks reported a Node failure as the literal ? whenever the suite died
before printing a FAIL line, so the verdict could not tell "no cause found"
from "here is the cause". A new helper, _node_failure(out, returncode, suite),
names a measured cause on every path: the exit code, how many lines came out,
and the last line that did.
The rule is now asserted on the AST over every returned verdict and every
helper that returns a string, so a tenth next(..., "?") is caught rather than
left for someone to notice. Eleven sibling checks already did this correctly,
which is what made the nine visible.
The guard itself was green on code it claimed to see, five times in a row:
a tuple filter that saw 0 of 4 real sites, a [^)]* that cannot cross a
generator's closing paren, a guard that flagged its own docstring, get_docstring
raising TypeError on an arguments node, and ast.unparse rewriting "?" as
'?' so a pattern written in the source's own quoting could never match its own
output. It now audits expression leaves only.
Proved across seven directions, including the two that must stay green: a ?
inside a docstring that documents the old bug is not a defect, and a check that
flags its own documentation teaches you to ignore it.