Repository navigation
Fix four documentation examples that were not valid Python - #4919
Merged
Merged
Conversation
A stray parenthesis in the Command() example, an unterminated string in the MSVC_VERSION example, a missing comma that joined the two X_RPM_EXTRADEFS strings into one, and a Progress() callable in the user guide missing a colon and a global declaration. Assisted-by: Claude Opus 5.5 Signed-off-by: Roshan Ramani <roshanramani.dev@gmail.com>
Collaborator
|
These all look good at an initial glance. |
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.
Following up on the comment in #4918 about manpage examples rotting. I ran every
<example_commands>and<programlisting>block underSCons/anddoc/user/through Python's parser and went through the failures. Most are intentional (shell output,...placeholders, C sources). These four are plain mistakes:Environment.xml,Command():env.Command(env.Dir('$DISTDIR')), None, make_distdir)has a stray).Tool/msvc.xml,MSVC_VERSION:env['MSVC_VERSION'] = '14.2is missing its closing quote.Tool/packaging/packaging.xml,X_RPM_EXTRADEFS: the two%definestrings have no comma between them, so Python joins them into one string.doc/user/output.xml, theProgress()callable:def progress_function(node)has no colon, andcount += 1raisesUnboundLocalErrorwithoutglobal count.I ran the corrected
Command()andProgress()examples in an SConstruct withscripts/scons.py, and both work.bin/docs-validate.pypasses. Thedoc/generated/*.gencopies still have the old text; I left them alone because they get regenerated at release time.Contributor Checklist:
CHANGES.txtandRELEASE.txt(and read theREADME.rst).No test was added, because this only changes documentation examples. RELEASE.txt is not updated, since its DOCUMENTATION section says to leave out individual typo fixes.
Written by Claude Code (Claude Opus 5.5) under my account, as the
Assisted-by:trailer says. It came from a scan of the examples, not from an issue.