diff options
author | Johannes Dewender <bitbucket@JonnyJD.net> | 2013-10-09 15:14:14 +0200 |
---|---|---|
committer | Johannes Dewender <bitbucket@JonnyJD.net> | 2013-10-09 15:14:14 +0200 |
commit | 2e07e7dc256defb6c2f4f3ce80ab47f9dca093a1 (patch) | |
tree | 49ee3f3128ba2279d32d0073639e8a2b57a73b13 /sphinx/ext/autodoc.py | |
parent | 313559116dc469e710ca8bff3457b949c1703fb4 (diff) | |
download | sphinx-git-2e07e7dc256defb6c2f4f3ce80ab47f9dca093a1.tar.gz |
autodoc: fix annotation None for properties
This is a follow-up for pull request #109
/ bdb3fadacd96cc9019440f2b3aad74f9c72b0500
Diffstat (limited to 'sphinx/ext/autodoc.py')
-rw-r--r-- | sphinx/ext/autodoc.py | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/sphinx/ext/autodoc.py b/sphinx/ext/autodoc.py index a224fe61e..348c072c4 100644 --- a/sphinx/ext/autodoc.py +++ b/sphinx/ext/autodoc.py @@ -1252,13 +1252,14 @@ class AttributeDocumenter(ClassLevelDocumenter): def add_directive_header(self, sig): ClassLevelDocumenter.add_directive_header(self, sig) - if not self._datadescriptor and not self.options.annotation: - try: - objrepr = safe_repr(self.object) - except ValueError: - pass - else: - self.add_line(u' :annotation: = ' + objrepr, '<autodoc>') + if not self.options.annotation: + if not self._datadescriptor: + try: + objrepr = safe_repr(self.object) + except ValueError: + pass + else: + self.add_line(u' :annotation: = ' + objrepr, '<autodoc>') elif self.options.annotation is SUPPRESS: pass else: |