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
First pass at autodoc support #464
Conversation
Here's how we're looking now... I think we're possibly(?) far along with this now that we could consider pulling it in, and then making incremental improvements as we go. It's a bit tricky trying to judge how much typing information to include in docstring descriptions when a parameter can accept a number of different types - I've not been terribly precise about that yet - would be happy to either try to clean anything up comprehensively in this PR, or take this as a starting point. Things that would be nice in the future:
|
@tomchristie Do you think this is ready for review, and potentially merging in? |
@florimondmanca Yes I think so. Obvs we'll have some work to do on:
But from my POV I think it's probably worth us getting in, and then iterating on. |
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.
Yup, looks good to me! Just a few possible typos.
I fixed the few typos from my last review, merging in now! 🎉 |
Thanks! 😃 |
I've started working on an autodoc extension for use with mkdocs.
This pull request demonstrates using it with the
httpx.request
function, just for visibility of where I think we need to go here.Bits to do:
Nested code blocks in the docstring are not rendering. (I tried installing the- Resolvedpymdownx.superfences
extension, which didn't appear to resolve the issue, either. *Any help with resolving this would be much appreciated.**)Need to look at rendering classes, not just functions. More complicated. There's some limited support for this, but will need work.- Resolved__init__
.I'm using a- Resolveddd
element as a bit of a styling hack, as it gives me a nicely indented block for the docstring. Probably ought to be a div with an appropriate class, or some other appropriate block element, with styling applied ideally by mkdocs-material, rather than having to add custom styling for it.