From 2fdfacb34ec26f7df685f130dcf727713f174527 Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Fri, 11 Oct 2013 12:15:02 -0400 Subject: [PATCH] Docs: Fix ugly nulljob repr in method signatures --- help/conf.tmpl | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/help/conf.tmpl b/help/conf.tmpl index 860be4e3..7c66d5ef 100644 --- a/help/conf.tmpl +++ b/help/conf.tmpl @@ -12,6 +12,7 @@ # serve to show the default. import sys, os +import re # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the @@ -20,6 +21,16 @@ import sys, os # for autodocs sys.path.insert(0, os.path.abspath(os.path.join('..', '..'))) +# -- Misc fixes for autodoc + +def fix_nulljob_in_sig(app, what, name, obj, options, signature, return_annotation): + if signature: + signature = re.sub(r"", "nulljob", signature) + return signature, return_annotation + +def setup(app): + app.connect('autodoc-process-signature', fix_nulljob_in_sig) + # -- General configuration ----------------------------------------------------- # If your documentation needs a minimal Sphinx version, state it here.