-
-
Notifications
You must be signed in to change notification settings - Fork 48
Description
If I document instance variables as follows
class A:
def __init__(self):
self.a = None
"""Documented instance variable."""
then they do not show up in the attributes section (or anywhere at all) of the class documentation pages generated by automodapi
, even with :include-all-objects:
.
It would be ideal to find them in the attributes section, together with the properties and the class variables, as the user is not supposed to be able to distinguish between those three types (after all property's job is to make the user think they are dealing with variables while really they are using functions).
Note that there seems to be an undocumented autoinstanceattribute
keyword that might be useful.
(If I use the alternative approach of putting :ivar a: Documented instance variable.
in the class' docstring then they appear as part of the class documentation in an info field list but they cannot be referenced, i.e. :py:obj:'a'
does not find its target.)