Skipping documentation

45 views
Skip to first unread message

Mmanu Chaturvedi

unread,
Jan 7, 2020, 12:00:12 PM1/7/20
to sphinx-users
Hi,

I was wondering if we have proper documentation for the following:

We have:
"If more than one enabled extension handles the autodoc-skip-member event, autodoc will use the first non-None value returned by a handler. Handlers should return None to fall back to the skipping behavior of autodoc and other enabled extensions. "

What would be the behavior if all the values returned are `None`?
Or, in other words, what would be the default skipping behavior of autodoc?

Komiya Takeshi

unread,
Jan 8, 2020, 11:42:34 AM1/8/20
to sphinx...@googlegroups.com
Hi,

By default, private members (starts with underscore), special members
(double underscored) and undocumented members are skipped. But users
can change it via directive options (ex. :private-members: and
:special-members:).

Thanks,
Takeshi KOMIYA

2020年1月8日(水) 2:00 Mmanu Chaturvedi <mmanu.ch...@gmail.com>:
> --
> You received this message because you are subscribed to the Google Groups "sphinx-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sphinx-users...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sphinx-users/d9de9bd7-89dc-4fc7-930b-cd7c537b5c9a%40googlegroups.com.

Mmanu Chaturvedi

unread,
Jan 8, 2020, 12:02:50 PM1/8/20
to sphinx-users
Hi Komiya,

Thank you for the quick reply!

I guess you're talking about this piece of code:
https://github.com/sphinx-doc/sphinx/blob/master/sphinx/ext/autodoc/__init__.py#L564-L613

I am sorry if I was not clear.  I was asking about the documentation part on the website. 
I had to go through the code in order to understand the behavior.  Since I wasn't able to find the intended behavior in the documentation, I was not sure if there was or wasn't a bug in the code.

To give you a little context:

We were facing a problem due to pybind11, which manifested itself via sphinx.  Sphinx (1.6.7) wasn't able to deduce the proper class name for some `__init__`s defined via pybind11.

It looks likes it might have been due to improperly initialized `__qualname__`s.  But I am not sure:
https://github.com/pybind/pybind11/issues/2059

Cheers,
Mmanu

On Wednesday, January 8, 2020 at 11:42:34 AM UTC-5, Komiya Takeshi wrote:
Hi,

By default, private members (starts with underscore), special members
(double underscored) and undocumented members are skipped. But users
can change it via directive options (ex. :private-members: and
:special-members:).

Thanks,
Takeshi KOMIYA

2020年1月8日(水) 2:00 Mmanu Chaturvedi <mmanu.c...@gmail.com>:
>
> Hi,
>
> I was wondering if we have proper documentation for the following:
> https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#event-autodoc-skip-member
>
> We have:
> "If more than one enabled extension handles the autodoc-skip-member event, autodoc will use the first non-None value returned by a handler. Handlers should return None to fall back to the skipping behavior of autodoc and other enabled extensions. "
>
> What would be the behavior if all the values returned are `None`?
> Or, in other words, what would be the default skipping behavior of autodoc?
>
> --
> You received this message because you are subscribed to the Google Groups "sphinx-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sphinx...@googlegroups.com.

Komiya Takeshi

unread,
Jan 9, 2020, 11:46:18 AM1/9/20
to sphinx...@googlegroups.com
Hmm... Sorry, I'm not familiar with napoleon extension.

Please file an issue to GitHub if you feel unnatural behavior. I'll
try to investigate :-)

Thanks,
Takeshi KOMIYA

2020年1月9日(木) 2:02 Mmanu Chaturvedi <mmanu.ch...@gmail.com>:
> To unsubscribe from this group and stop receiving emails from it, send an email to sphinx-users...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sphinx-users/a9d78899-931e-4632-a193-89275b0a1942%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages