Commits

Johannes Dewender  committed f89d291

autodoc: fix annotation None for properties

This is a follow-up for pull request #109
/ bdb3fadacd96cc9019440f2b3aad74f9c72b0500

  • Participants
  • Parent commits 3eb2482

Comments (0)

Files changed (1)

File sphinx/ext/autodoc.py

 
     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: