Conversation
|
wow your docs look so much better than mine and I've been trying for 16 years to get them to be readable :( are those annotations after each param things you have to enter in the docstring explicitly w/ napoleon or are they derived from pep-484 annotations? they look much cleaner than pep484 annotations. |
|
yeah this looks great, i can follow it. |
Thanks 👼 Much is due to the theme though - we recently switched from the readthedocs theme to furo. Also our docs contain almost exclusively technical references (i.e. class definitions along with parameters, methods etc) and more detailed explanations of the usage are in a github wiki. that seems to be different for sqlalchemy and IMO changes the overall impression
Those are set explicitly (source for the method linked above). There are some extensions that try to parse the type annotations into the docstrings. I tried around with sphinx-autodoc-typehints a while ago and found manually writing the types to yield nicer results. Though I should add that this particular project has a new maintainer since then and probably has evolved quite a bit.
Sweet :) We're using a Telegram Bot in our support group that allows us to search through the documenation on the fly from within Telegram and being able to point users directly to the parameters has greatly improved our support. So it would be awesome if we could continue to do so for the keyword only arguments 👍 |
|
it's released. i didnt test it, so if there's problems, I'm sure we'll notice... |
Hi again :)
In python-telegram-bot/python-telegram-bot#3010 it was notices that
sphinx-paramlinksdoesn't work with napoleons "Keyword Arguments" - see e.g. here for how we use that to differentiate between positional and keyword-only arguments. See the docs of napoleon, sphinx-doc/sphinx#2379 and sphinx-doc/sphinx#2381 for more info on how "Keyword Arguments" are implemented in sphinx.However this seems to be rather easy to support by just enhancing two regexes a bit. A test on our documentation seemed to work fine.