From 045773b1198ed71bef9b2fc42715b901e83b330a Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Tue, 24 May 2016 23:40:58 -0700 Subject: [PATCH] Try without the currentmodule directive... --- TODO.rst | 2 +- etgtools/sphinx_generator.py | 4 ++-- sphinxtools/librarydescription.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/TODO.rst b/TODO.rst index 8f71608d..25a9b571 100644 --- a/TODO.rst +++ b/TODO.rst @@ -129,7 +129,7 @@ to be untangled: docstring (like the style flags in wx.CheckBox, etc.) and switch it to just changing it to "wx." - * There is an extra modulename "wx.", "wx.adv." etc. being added to things + * [done] There is an extra modulename "wx.", "wx.adv." etc. being added to things like named anchors, etc. Is that because of the "currentmodule" directive? Or maybe because of using the fullname in the doc title. Figure it out and fix it. diff --git a/etgtools/sphinx_generator.py b/etgtools/sphinx_generator.py index 27f54931..147f8c9d 100644 --- a/etgtools/sphinx_generator.py +++ b/etgtools/sphinx_generator.py @@ -2339,7 +2339,7 @@ class XMLDocString(object): if '.' in fullname: module = self.current_module[:-1] - stream.write('\n\n.. currentmodule:: %s\n\n' % module) + #stream.write('\n\n.. currentmodule:: %s\n\n' % module) stream.write(templates.TEMPLATE_DESCRIPTION % (fullname, fullname)) @@ -2697,7 +2697,7 @@ class XMLDocString(object): if self.current_module.strip(): module = self.current_module.strip()[:-1] - stream.write('\n\n.. currentmodule:: %s\n\n' % module) + #stream.write('\n\n.. currentmodule:: %s\n\n' % module) stream.write(templates.TEMPLATE_DESCRIPTION % (fullname, fullname)) stream.write('\n\nThe `%s` enumeration provides the following values:\n\n' % enum_name) diff --git a/sphinxtools/librarydescription.py b/sphinxtools/librarydescription.py index 3c84484e..2fb4c526 100644 --- a/sphinxtools/librarydescription.py +++ b/sphinxtools/librarydescription.py @@ -567,7 +567,7 @@ class Module(ParentBase): label = 'Package' stream.write('.. module:: %s\n\n'%self.name) - stream.write('.. currentmodule:: %s\n\n'%self.name) + #stream.write('.. currentmodule:: %s\n\n'%self.name) stream.write('.. highlight:: python\n\n') header = templates.TEMPLATE_DESCRIPTION%(self.name, '%s'%self.GetShortName()) @@ -704,7 +704,7 @@ class Class(ParentBase): parts = self.name.split('.') current_module = '.'.join(parts[0:-1]) - stream.write('.. currentmodule:: %s\n\n'%current_module) + #stream.write('.. currentmodule:: %s\n\n'%current_module) stream.write('.. highlight:: python\n\n') class_docs = replaceWxDot(self.docs)