Repository navigation
docs(agents): tell packages to split a long ipython block - #20
Merged
Merged
Conversation
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.
This was referenced Oct 21, 2026
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.
Adds one sentence to the "Examples in the docs" section of the generated
AGENTS.md: split a long.. ipython:: pythonblock so that no multi-line statement is its 10th (or 100th) statement, because the directive runs only the first line of that one.Why. In IPython's
.. ipython::directive, a multi-line statement in position 10 (or 100) of a block is cut after its first line. The build then stops withSyntaxError: incomplete input, or, in a block with:okexcept:, shows that error on the page and aNameErrorwhere the name is used next. An earlier check reproduced it on IPython 9.10.0, 9.17.1 (the newest release) and IPython main, and found that positions 1, 2, 9, 11, 99 and 101 are fine. Splitting the block is the workaround. Nothing is posted upstream.Checked.
just test(bakes the template twice, withdocs_notebooksyes and no, and in each runsquality-check,build-docs, every pre-commit hook,distand the version checks) passed on a compute node: "All checks passed for both variants."AGENTS.mdof both bakes.Not checked.
copier updateon the packages (that is yours to run or approve). The wording of the sentence, which is the one thing to read.Other open PRs in python-template: none.