tools (volt): checkin_check -- no dead declarations: ADVISORY tuple removed, run() loses its unused repo/quiet params; 27/27
This commit is contained in:
1 parent
9ce64737dd
commit
c374a0ae72
1 file changed
+4
-5
@@ -85,7 +85,6 @@ HEADING_RE = re.compile(r"^#{1,6}\s+(.*\S)\s*$")
|
||||
WANT_HEADINGS = ("did", "blocked", "next", "ask")
|
||||
|
||||
FAULTS = ("BAD_NAME", "UNKNOWN_HANDLE", "BAD_DATE", "FUTURE", "EMPTY")
|
||||
ADVISORY = ("MISSING_HEADINGS", "GAP")
|
||||
# Not a check-in, and never silently dropped: the directory's own README is
|
||||
# printed as SKIP so a reader can see it was seen and why it was not graded.
|
||||
SKIP_NAMES = {"README.md"}
|
||||
@@ -299,7 +298,7 @@ def banner(text: str) -> str:
|
||||
return f"== {text} =="
|
||||
|
||||
|
||||
def run(repo: str, path: str, roster, today: date, show_gaps: bool, quiet=False,
|
||||
def run(path: str, roster, today: date, show_gaps: bool,
|
||||
since: str | None = None):
|
||||
"""Everything except printing the file table. Returns the report dict."""
|
||||
if not os.path.isdir(path):
|
||||
@@ -497,7 +496,7 @@ def selftest():
|
||||
cell("c10 roster is the union of table and mailmap, and says so",
|
||||
roster == {"timmy", "zephyrus", "volt"} and "WIZARDS-TABLE.md" in src,
|
||||
f"{roster} / {src}")
|
||||
rep = run(repo, ck, roster, today, True)
|
||||
rep = run(ck, roster, today, True)
|
||||
by = {r["file"]: r for r in rep["rows"]}
|
||||
cell("c11 a conforming complete file has no class",
|
||||
by["2026-10-17-volt.md"]["class"] == []
|
||||
@@ -550,7 +549,7 @@ def selftest():
|
||||
rep["skipped"] == ["README.md"]
|
||||
and "README.md" not in [r["file"] for r in rep["rows"]]
|
||||
and rep["checked"] == 7, f"{rep['skipped']} {rep['checked']}")
|
||||
rep_since = run(repo, ck, roster, today, False, since="2026-10-16")
|
||||
rep_since = run(ck, roster, today, False, since="2026-10-16")
|
||||
cell("c25 --since grades forward only, and says how many it left out",
|
||||
rep_since["checked"] == 5 and rep_since["excluded_since"] == 3
|
||||
and "2026-10-15-volt.md" not in [r["file"] for r in rep_since["rows"]],
|
||||
@@ -603,7 +602,7 @@ def main(argv=None):
|
||||
return 2
|
||||
try:
|
||||
roster, src = load_roster(repo, a.roster)
|
||||
rep = run(repo, path, roster, today, a.gaps, since=since)
|
||||
rep = run(path, roster, today, a.gaps, since=since)
|
||||
except CannotGrade as exc:
|
||||
print(str(exc), file=sys.stderr)
|
||||
return 2
|
||||
|
||||
Reference in new issue
Block a user