I've got some code that uses a metaclass in python. But when sphinx autodoc is run it is giving the error:

WARNING: py:class reference target not found: type

The error is occuring in a line of an auto generated .rst file:

.. automodule:: API.list.blockList
    :members: # this is the line in error
    :show-inheritance:

And blockList extends API.list.list which has \__metaclass__ set to my metaclass.

From what I can tell sphinx doesn't think that the builtin type class exists. I've tried importing the builtin type to make sphinx realize it's there but that hasn't worked.

If I remove the metaclass assignment from API.list.list, and remove the metaclass from the code then sphinx works just fine.

Edit
Report