sphinx-contrib / matlabdomain

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

Unable to document method with name `get` #151

Closed BuildingAtom closed 1 year ago

BuildingAtom commented 1 year ago

I'm trying to use this to help write documentation for a class which has a method called get in it. Unfortunately, it doesn't seem like I'm able to actually get autoclass to generate any documentation output for this method.

A quick example is

classdef ExampleGet < handle
    methods
        function varargout = get(self)
            % Gets the numbers 1-n and fills in the outputs with them
            %
            % Returns:
            %     double: multiple outputs with data `1` to `n` respectively.
            %
            for i=1:nargout
                varargout{i} = i;
            end
        end
    end
end

and the rst would have

.. mat:autoclass:: ExampleGet
   :show-inheritance:
   :members:
   :undoc-members:

but get would never be documented itself.

joeced commented 1 year ago

Thanks for the detailed report. I'll look into this soon