class Parameters(dict):
""" Some doc here """
pass
class System(object):
Parameter = Parameters
""" The default parameters attribute builder """
def __init__(self):
self.parameters = self.Parameters()
The problem is when i do a autoclass
of System with sphinx, the document Parameter will not be what I wrote bellow Parameter = Parameters
but will be the full doc of the Parameter class. I do not want that, it is too messy and do not match what my .Parameters attribute is really (can be a Parameters class but also a function, or a dict(a=0,b=1).copy
etc...) .
System
======
.. autoclass:: system.System
:members: __init__,Parameters
The only way I found is to set Parameters to None first and change it at init but it is not convenient for other reasons
class System(object):
Parameter = None
""" The default parameters attribute builder """
def __init__(self):
if self.Parameters is None:
self.Parameters = Parameters
self.parameters = self.Parameters()