I am running into the issue described in https://github.com/sphinx-doc/sphinx/issues/8664, in which I have a class with type-annotated members as well as Google-style Attributes: pydocs, e.g.:
class Foo(Bar):
"""Something something.
Attributes:
baz: A handy thing.
"""
baz: str
When I run sphinx-apidoc
over my project, I get:
docstring of my_project.Foo.baz:1:duplicate object description of my_project.Foo.baz, other instance in source/my_project, use :noindex: for one of them
I understand that this is essentially due to the automatic setting of :undoc-members:
by sphinx-apidoc
. That is a useful setting (since I don't always have all members documented), but in this case, it collides with my documented members. Barring an elegant solution in which I could specify how to resolve such collisions, I would be happy to just tell autodoc
to turn off :undoc-members:
for my class Foo
.
Is there some way to do that, e.g. via an event that supports changing the options for specific members?