-
Notifications
You must be signed in to change notification settings - Fork 788
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Export types & doc improvements #2329
Conversation
Looks good. Please add screenshots when its ready! |
As of bbde665, this PR exports almost everything that the docs link to via argument types, return types, and exceptions raised. To accommodate this, the API section grew 4 pages:
The first three pages contained 2+ objects that were referenced in other API pages so I thought it was best to add the whole API page. Questions for @willmcgugan:
CC @davep because you seem to have sensible ideas and suggestions when it comes to the docs :P |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You've removed the Returns:
sections I intentionally put it.
Without them I couldn't get the docs to actually link to the return values of properties. Unless you have found a way of making that work automatically, can you restore the Returns:
All looking good to me; although it does raise one thing that overlaps with this quite a bit. This might be best as another issue but perhaps some of this can be rolled in here as it is about types and linking. When I see something like this: [VideoPlayer][textual.widgets._video_player.VideoPlayer] I feel it should really be like this: [`VideoPlayer`][textual.widgets._video_player.VideoPlayer] as the result in the docs does give the type name a slightly different, and I think beneficial, styling. Strong feelings either way, and scope for this or a followup PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving within the bounds of Will's requested changes.
I feel strongly that you are right and that mentions to code objects/entities should be styled with backticks. I'll add those in. |
We need to have explicit 'Returns:' sections in properties if we want to link to the return type while mkdocstrings/python#65 is open.
This will close #2168 when it's done.
I did a pass on the App API page and looked for types that are used in signatures and that aren't documented.
This is the type of change I suggest.
If everyone is ok with this type of changes, I will go over the remainder of the API pages.
We still need to figure out how to document type aliases without duplicating their definition.