Repository navigation
Fix the runnable examples in the comments guide - #1656
Open
AmanBoronbaev wants to merge 1 commit into
Open
AmanBoronbaev wants to merge 1 commit into
AmanBoronbaev wants to merge 1 commit into
Conversation
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.
The comments guide stops at
Document.add_comment()because the example is missing a comma betweentextandauthor. Once the call succeeds,comment.idandcomment.dateboth raiseAttributeError.Use the public
comment_idandtimestampproperties. The lookup example now shows the retrieved text, and the timestamp example shows its UTC timezone. Those values can be checked without relying on a particular date or object address. The rich-content section also uses reStructuredText emphasis for “block-item container” so Sphinx renders it correctly.All 22 examples in the guide pass with
python -m doctest docs/user/comments.rst. Saving and reopening the example document preserved both comments, including the author, initials, UTC timestamp and bold run. The unit test suite passed all 1,609 tests, and the HTML guide built with Sphinx warnings treated as errors.AI assistance: OpenAI Codex prepared the documentation changes, executed the guide examples, and checked the saved document.