DocMeta

class marxs.base.DocMeta(name, bases, dict)[source] [edit on github]

Bases: type

Metaclass to inherit docstrings when required.

When a derived class overwrites a method that was already defined in its base class, the new method usually has the same purpose as the original method and often uses the same parameters, too, although the implementation differs slightly. In this case, it should have the same docstring, too. This metaclass will look for methods that are undocumented and add the docstring of the appropriate parent method to them.