summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sphinx/builders/html.py3
-rw-r--r--sphinx/pycode/__init__.py1
-rw-r--r--sphinx/pycode/pytree.py4
3 files changed, 5 insertions, 3 deletions
diff --git a/sphinx/builders/html.py b/sphinx/builders/html.py
index 4ce30ad8..2bcd54ec 100644
--- a/sphinx/builders/html.py
+++ b/sphinx/builders/html.py
@@ -37,8 +37,9 @@ except ImportError:
except ImportError:
json = None
-
+#: the filename for the inventory of objects
INVENTORY_FILENAME = 'objects.inv'
+#: the filename for the "last build" file (for serializing builders)
LAST_BUILD_FILENAME = 'last_build'
diff --git a/sphinx/pycode/__init__.py b/sphinx/pycode/__init__.py
index ab34af1c..dd32d470 100644
--- a/sphinx/pycode/__init__.py
+++ b/sphinx/pycode/__init__.py
@@ -77,6 +77,7 @@ class ClassAttrVisitor(pytree.NodeVisitor):
pnode = pnode.get_prev_leaf()
if not pnode or pnode.type not in (token.INDENT, token.DEDENT):
break
+ prefix = pnode.get_prefix()
docstring = prepare_commentdoc(prefix)
if not docstring:
return
diff --git a/sphinx/pycode/pytree.py b/sphinx/pycode/pytree.py
index bd72bc99..46017a95 100644
--- a/sphinx/pycode/pytree.py
+++ b/sphinx/pycode/pytree.py
@@ -221,8 +221,8 @@ class Leaf(Base):
self.prefix = prefix
def __repr__(self):
- return "%s(%r, %r)" % (self.__class__.__name__,
- self.type, self.value)
+ return "%s(%r, %r, %r)" % (self.__class__.__name__,
+ self.type, self.value, self.prefix)
def __str__(self):
"""This reproduces the input source exactly."""