mkdocstrings / pytkdocs

Load Python objects documentation.
https://mkdocstrings.github.io/pytkdocs
ISC License
50 stars 32 forks source link

Support "Keyword Arguments" sections in Google-style docstrings #88

Closed pawamoy closed 3 years ago

pawamoy commented 3 years ago

Is your feature request related to a problem? Please describe. Keyword sections is useful to document the possible contents of **kwargs. Without it, users must write keyword arguments documentation in the Arguments section, under the **kwargs parameter, using plain Markdown, therefore not benefiting from the table template.

Describe the solution you'd like Support keyword arguments section in the google style parser.

Describe alternatives you've considered As mentioned previously, an alternative is to document kwargs in the Arguments section, but this is a bit tedious to do it right.

Additional context Only the Google-style parser is concerned by this feature request. Other issues will be needed for the other parsers, if needed. Originally asked on mkdocstrings: https://github.com/pawamoy/mkdocstrings/issues/205

HacKanCuBa commented 3 years ago

Adding for reference that napoleon supports it: https://sphinxcontrib-napoleon.readthedocs.io/en/latest/index.html#docstring-sections

pawamoy commented 3 years ago

Thanks :relaxed:

Note that the feature request is accepted, we just need time from the maintainers (me, probably) or a PR :stuck_out_tongue:

HacKanCuBa commented 3 years ago

hahaha I see what you did there :dancers:

Anyway, I hacked a PR, will push soon.