sphinx-contrib / matlabdomain

A Sphinx extension for documenting Matlab code
http://sphinxcontrib-matlabdomain.readthedocs.io/
Other
69 stars 45 forks source link

implement :inherited-members: option for autoclass #180

Open rdzman opened 1 year ago

rdzman commented 1 year ago

Currently, attempting to use :inherited-members: with the autoclass directive results in a fatal error.

Exception occurred:
  File "... sphinxcontrib/mat_documenters.py", line 247, in get_object_members
    members = inspect.get_members(self.object, attr_getter=self.get_attr)
AttributeError: module 'inspect' has no attribute 'get_members'

Initially I thought that the inheritance information was not included in the parsed objects, but it seems it is there and we would just need to implement the code to look up the inherited members.

Looks like this issue was brought up a few years ago in #98. Not sure if anything has changed since then to make it easier.

joeced commented 1 year ago

It's the same issue as ever. Being based on the Python autodoc feature, we "inherited" a lot of features from that.