[Python-checkins] r58111 - doctools/trunk/sphinx/directives.py

georg.brandl python-checkins at python.org
Wed Sep 12 20:03:15 CEST 2007


Author: georg.brandl
Date: Wed Sep 12 20:03:15 2007
New Revision: 58111

Modified:
   doctools/trunk/sphinx/directives.py
Log:
Don't append module names for methods.


Modified: doctools/trunk/sphinx/directives.py
==============================================================================
--- doctools/trunk/sphinx/directives.py	(original)
+++ doctools/trunk/sphinx/directives.py	Wed Sep 12 20:03:15 2007
@@ -141,16 +141,14 @@
     else:
         fullname = classname + name if classname else name
 
+    if classname:
+        signode += addnodes.desc_classname(classname, classname)
     # exceptions are a special case, since they are documented in the
     # 'exceptions' module.
-    if env.config.get('add_module_names', True) and \
+    elif env.config.get('add_module_names', True) and \
            env.currmodule and env.currmodule != 'exceptions':
         nodetext = env.currmodule + '.'
-        if classname:
-            nodetext += classname
         signode += addnodes.desc_classname(nodetext, nodetext)
-    elif classname:
-        signode += addnodes.desc_classname(classname, classname)
 
     signode += addnodes.desc_name(name, name)
     if not arglist:


More information about the Python-checkins mailing list