Repository navigation
Accept sphinx-build -D boolean strings as bools - #730
Open
Cherith1222 wants to merge 2 commits into
Open
Cherith1222 wants to merge 2 commits into
Cherith1222 wants to merge 2 commits into
Conversation
sphinx-build -D passes True as a string, and Sphinx only converts 0 and 1 for bool defaults. A cached override string is replaced as well. AI-assisted (Cursor). The account owner confirmed this can be submitted.
pre-commit checks myst_nb together, and Sphinx types add_js_file priority as int. Cast the stored string options so that check passes. AI-assisted (Cursor).
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.
sphinx-build -Dpasses every override as a string. These notebook options are registered asAnywith a boolean default, so Sphinx only accepts0and1.-D nb_execution_allow_errors=Truewas therefore rejected, andFalsewould not stay false if it were coerced withbool().The usual spellings (
true/false,yes/no,on/off,1/0) are converted to real bools for the boolean notebook options, including the deprecated names. Sphinx caches an override string while logging the config object, so the converted value is written back onto the config.Fixes #417.
This pull request was drafted with assistance from Cursor. The account owner confirmed it before it was submitted.