From 5d583468e7e1bcc12ce8bb9075e0393be6a02b57 Mon Sep 17 00:00:00 2001 From: Mathieu Virbel Date: Mon, 20 Dec 2010 23:26:41 +0100 Subject: [PATCH] monkey patch sphinx to be able to recognize Cython class as Python class by giving a higher priority to ClassDocumenter. --- doc/sources/conf.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/sources/conf.py b/doc/sources/conf.py index 458569f14..2d5334874 100644 --- a/doc/sources/conf.py +++ b/doc/sources/conf.py @@ -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']