Put the async twin note above the constructor in the generated reference - #101
Merged
Merged
Conversation
For an Async* class, the fact that it mirrors its sync twin is the first thing a reader needs, but emit_class printed it last, below the constructor signature and argument list. Move it to just after the class description. Review feedback on the generated page asked for this on the two async servers; doing it in the generator also covers AsyncBrowser and AsyncSession.
cdebled
self-requested a review
September 15, 2026 15:09
cdebled
approved these changes
Sep 15, 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.
Addresses the second round of review feedback on #97.
For an
Async*class, the fact that every method of its sync twin exists on it is the first thing a reader needs.emit_classprinted that sentence last, below the constructor signature, its argument list and the context-manager note, so it arrived after the details it was meant to frame. This moves it to just after the class description.The reviewer asked for this on
AsyncCDPServerandAsyncBiDiServer. Fixing it in the generator also coversAsyncBrowserandAsyncSession, which had the same problem and were not commented on.One note on placement. The suggestion pointed at the line between a class's intro prose and its usage example, but that example lives inside the class docstring, so the generator emits prose and example as one unit. The sentence now lands after the whole docstring. Splitting them would mean parsing docstring internals, which does not seem worth it.
The text itself is unchanged; this is purely a move.
Pairs with lightpanda-io/lightpanda-python#8, which handles the repeated "Forwarded to the sync class" bullets from the first round. The two are independent and can land in either order. I generated the page against the current SDK
mainas well as against that branch, and both come out valid.Editing this script is a trigger path for the
python-referenceworkflow, so the generation runs here as a smoke check.