monkey patch sphinx to be able to recognize Cython class as Python class by giving a higher priority to ClassDocumenter.

This commit is contained in:
Mathieu Virbel 2010-12-20 23:26:41 +01:00
parent f76e55a0f1
commit 5d583468e7
1 changed files with 5 additions and 0 deletions

View File

@ -25,6 +25,11 @@ import sys, os
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc']
# XXX HACK mathieu: monkey patch the autodoc module, to give a better priority
# for ClassDocumenter, or the cython class will be documented as AttributeClass
import sphinx.ext.autodoc
sphinx.ext.autodoc.ClassDocumenter.priority = 10
# Add any paths that contain templates here, relative to this directory.
templates_path = ['.templates']