From 75a8067b3d0eed332ea0906f17d65e032c2ed0de Mon Sep 17 00:00:00 2001 From: James Mineau Date: Mon, 19 Oct 2026 16:08:49 -0600 Subject: [PATCH] docs(agents): tell packages to split a long ipython block A multi-line statement that is the 10th (or 100th) statement of a `.. ipython:: python` block runs only its first line, so the build stops with a SyntaxError, or with `:okexcept:` shows one. Say in the generated AGENTS.md to split such a block. --- template/AGENTS.md.jinja | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/template/AGENTS.md.jinja b/template/AGENTS.md.jinja index 7044554..b423ce9 100644 --- a/template/AGENTS.md.jinja +++ b/template/AGENTS.md.jinja @@ -112,7 +112,9 @@ when one breaks. A block that raises or warns fails the build; `:okexcept:` or `:okwarning:` under the directive allows one that is meant to. All `.rst` pages share one - session, so each page imports and defines what it uses. + session, so each page imports and defines what it uses. Split a long block so + that no multi-line statement is its 10th (or 100th) statement: the directive + runs only the first line of that one. {%- if docs_notebooks %} - **Code cells in a Markdown page:** a page (`.md`) under `docs/` can mix prose with code cells that run, each showing what it prints and plots, as in a