mkdocstrings / mkdocstrings

:blue_book: Automatic documentation from sources, for MkDocs.
https://mkdocstrings.github.io/
ISC License
1.63k stars 102 forks source link

Can't get Mkdocstrings to understand Numpy docstrings #670

Closed ldouteau closed 4 weeks ago

ldouteau commented 1 month ago

Hi, Sorry if that's not a bug, i filed it here because i liked the issue format.

Description of the bug

Setting Mkdocstring to use Numpy docstrings has no effect.

I tried to configure Mkdocstrings following the guidelines in the doc, but the API doc remains formatted nicely for Google docstrings and not for Numpy ones. I tried several configurations, but from what i observed setting docstring_style had no effect.

To Reproduce

I get the following: image

Full traceback

No error logs showing up, Mkdocs runs smoothly

Expected behavior

Setting docstring_style to numpy should format nicely the function documented with Numpy docstrings.

Setting docstring_style to google should format nicely the function documented with Google docstrings (Works currently).

I would love automatic detection of docstring format (for heterogeneous codebases) but i would understand if this were too complex to setup.

Environment information

python -m mkdocstrings.debug  # | xclip -selection clipboard

Additional context

pawamoy commented 4 weeks ago

Hi @ldouteau, sorry for the late answer. It looks like you just need to dedent docstring_style once.

ldouteau commented 4 weeks ago

Thanks for your answer, that fixed it !