From b1d7fbe88c6d15b2dd1de5e190aee7129944f1e3 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 9 Sep 2026 01:58:49 +0000 Subject: [PATCH] Sync shared figure tooling to its final formatter-fixed-point revision Re-copy docs/figures/{palette,make_family}.py from the launch programme's shared source (byte-identical, sha256 verified) and rename make_surfaces.py's unused render() theme-name parameter to _name to match. Tighten the docs/figures per-file-ignores in pyproject.toml to the exact named PLR0913/PLR0917/T201 codes still needed now that the shared files fixed their own FBT003/ARG001 findings -- no blanket exclude, so a real bug in either shared file still surfaces here. Every regenerated figure is byte-identical to what was already committed. Co-Authored-By: Claude Opus 5 Signed-off-by: Claude --- docs/figures/make_family.py | 13 +++++++------ docs/figures/make_surfaces.py | 2 +- pyproject.toml | 19 ++++++++----------- 3 files changed, 16 insertions(+), 18 deletions(-) diff --git a/docs/figures/make_family.py b/docs/figures/make_family.py index 3b699ce..6a70d5e 100644 --- a/docs/figures/make_family.py +++ b/docs/figures/make_family.py @@ -39,7 +39,7 @@ def role(key): return " ".join(ROLES[key]) -def _block(rect, name, role, t, filled, chars): +def _block(rect, name, role, t, chars, *, filled=False): """A repository: monospace identifier, wrapped role beneath it.""" x, y, w, h = rect accent = t["enforcement"][1] @@ -61,13 +61,13 @@ def _block(rect, name, role, t, filled, chars): ) -def render(t, name): +def render(t, _name): """One theme's copy of the family diagram.""" a = t["enforcement"][1] svg = p.open_svg(W, H, t, "The open-coder-ai family", DESC) intel = role("chock-threat-intel") - svg += _block((24, 24, 262, 72), "chock-threat-intel", intel, t, False, NARROW) + svg += _block((24, 24, 262, 72), "chock-threat-intel", intel, t, NARROW) svg += p.box(314, 24, 262, 72, t["surface"], t["neutral"]) svg += p.text(326, 44, "plugin repositories", t["text"], NAME, p.MONO, "600") @@ -78,11 +78,12 @@ def render(t, name): svg += p.arrow(445, 122, 445, 96, a) cat = role("chock-catalog") - svg += _block((24, 124, 552, 74), "chock-catalog", cat, t, True, WIDE) + svg += _block((24, 124, 552, 74), "chock-catalog", cat, t, WIDE, filled=True) svg += p.arrow(300, 198, 300, 224, a) - svg += _block((24, 226, 552, 74), "chock", role("chock"), t, True, WIDE) + svg += _block((24, 226, 552, 74), "chock", role("chock"), t, WIDE, filled=True) svg += p.arrow(300, 328, 300, 302, a) - svg += _block((24, 330, 552, 74), "agentseam", role("agentseam"), t, True, WIDE) + seam = role("agentseam") + svg += _block((24, 330, 552, 74), "agentseam", seam, t, WIDE, filled=True) svg += p.box(596, 24, 180, 380, t["surface"], a) svg += p.text(608, 46, "context-report", t["text"], NAME, p.MONO, "600") diff --git a/docs/figures/make_surfaces.py b/docs/figures/make_surfaces.py index 2cf9cf2..18c94d6 100644 --- a/docs/figures/make_surfaces.py +++ b/docs/figures/make_surfaces.py @@ -92,7 +92,7 @@ def _node(cx, y, surface, t): return out -def render(t, name): +def render(t, _name): a = t["enforcement"][1] n_names = len(CHOCK_AGENT) n_vendors = len(set(CHOCK_AGENT.values())) diff --git a/pyproject.toml b/pyproject.toml index 7b81405..0d6d36a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -187,17 +187,14 @@ max-statements = 50 "docs/assets/**" = ["ERA001", "PLR0913", "PLR0917", "PLR2004", "PLW2901", "RUF001", "RUF003", "RUF005", "S101", "S603", "T201"] # docs/figures/{palette,make_family}.py are the open-coder-ai launch programme's shared # figure tooling, copied byte-identically into every repo in the family and never -# hand-edited here (see docs/figures/make_surfaces.py's docstring): their SVG helpers take -# more than five positional args by design, `_block`'s `filled` is a real boolean the -# family diagram switches a fill on, and printing what a generator wrote is the feature. -"docs/figures/palette.py" = ["PLR0913", "PLR0917", "T201"] -"docs/figures/make_family.py" = ["ARG001", "FBT003", "PLR0913", "PLR0917", "T201"] -# chock's own figure generators, same dev/build-script reasoning as docs/assets above: -# render(t, name) fulfills the shared write_pair(stem, render) callback shape from -# docs/figures/palette.py even where a figure's drawing does not need `name`, and -# printing what each generator wrote is the feature. -"docs/figures/make_surfaces.py" = ["ARG001", "T201"] -"docs/figures/make_social_card.py" = ["T201"] +# hand-edited here (see docs/figures/make_surfaces.py's docstring): `box`, `text` and +# `arrow` take more than five arguments because they take coordinates, and `_block` takes +# more than five because it draws one. Named, not blanket, so a real bug in a file four +# repos depend on -- an undefined name, an unused import -- still surfaces here. +"docs/figures/palette.py" = ["PLR0913", "PLR0917"] +"docs/figures/make_family.py" = ["PLR0913"] +# A generator's print of what it wrote is the feature, same as docs/assets above. +"docs/figures/make_*.py" = ["T201"] # A standalone CLI dev-tool script: printing its findings to stderr is the feature. "tools/check_literal_duplication.py" = ["T201"] "tools/check_readme_wordcount.py" = ["T201"]