Repository navigation
Take the Session conventions from the package docstring - #112
Merged
Merged
Conversation
`CONVENTIONS` and `CLASS_NOTES` carried prose about how Session's methods are called, with hand-written anchors, in a repository that cannot see whether the package still works that way. lightpanda-python now says it in the Session docstring, which this script already renders -- and its `:meth:` roles resolve to the same anchors the hardcoded links spelled out, so the page reads as before. The paragraphs move from above the class list into the Session section, where they apply. Part of lightpanda-io/lightpanda-python#6.
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.
Pairs with lightpanda-io/lightpanda-python#13, for item 2 of lightpanda-io/lightpanda-python#6.
CONVENTIONSandCLASS_NOTESdescribed howSession's methods are called — keyword-only, snake_case,selectoroverbackend_node_id,callas the escape hatch,ToolErroron failure — from a repository that cannot import the package and so cannot tell whether any of it is still true. The package now says it in theSessiondocstring, which this script already renders.No rendering is lost. The docstring's
:meth:roles come out ofpdoc.docstrings.convertas code spans, andrender_proselinks them against the same symbol table, producing exactly the anchors the hardcoded strings spelled out by hand:What changes on the page is placement: the two convention paragraphs move from above the class list into the
Sessionsection, next to the class they constrain, andAsyncSessiongains a line pointing back at it.src/content/reference/python.mdxis deliberately not touched here — the dailypython-referenceworkflow regenerates and pushes it, and it will pick this up on its next run once #13 is merged. Verified locally against that branch.