summaryrefslogtreecommitdiff
path: root/sphinx
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2010-08-14 17:04:25 +0200
committerGeorg Brandl <georg@python.org>2010-08-14 17:04:25 +0200
commit08d036efe0c50d896c9f68def195d6aff978a7e2 (patch)
tree19cf1a53032f006bad59ea24385f2a5d019b65b4 /sphinx
parent61ca36770abba35e326c564bb004105cbe2dbe4e (diff)
downloadsphinx-08d036efe0c50d896c9f68def195d6aff978a7e2.tar.gz
Fix handling of doc field types for different directive types.
Diffstat (limited to 'sphinx')
-rw-r--r--sphinx/directives/__init__.py1
-rw-r--r--sphinx/util/docfields.py2
2 files changed, 1 insertions, 2 deletions
diff --git a/sphinx/directives/__init__.py b/sphinx/directives/__init__.py
index 48c44178..b7adbcaf 100644
--- a/sphinx/directives/__init__.py
+++ b/sphinx/directives/__init__.py
@@ -162,7 +162,6 @@ class ObjectDescription(Directive):
self.env.temp_data['object'] = self.names[0]
self.before_content()
self.state.nested_parse(self.content, self.content_offset, contentnode)
- #self.handle_doc_fields(contentnode)
DocFieldTransformer(self).transform_all(contentnode)
self.env.temp_data['object'] = None
self.after_content()
diff --git a/sphinx/util/docfields.py b/sphinx/util/docfields.py
index 6ce6d82b..89f81e8c 100644
--- a/sphinx/util/docfields.py
+++ b/sphinx/util/docfields.py
@@ -167,7 +167,7 @@ class DocFieldTransformer(object):
def __init__(self, directive):
self.domain = directive.domain
- if not hasattr(directive, '_doc_field_type_map'):
+ if '_doc_field_type_map' not in directive.__class__.__dict__:
directive.__class__._doc_field_type_map = \
self.preprocess_fieldtypes(directive.__class__.doc_field_types)
self.typemap = directive._doc_field_type_map