def add_content(self, more_content, no_docstring=False): """Patch to add the documentation from the mock object before any other documentation.""" encoding = self.analyzer and self.analyzer.encoding docstrings = self.get_doc(encoding) for i, line in enumerate(self.process_doc(docstrings)): self.add_line(line, '<autodoc>', i) ClassLevelDocumenter.add_content(self, more_content, True)
def add_content(self, more_content, no_docstring=False): # Remember the original no_docstring parameter. _no_docstring = no_docstring # If this attribute appears to be a Column... if (isinstance(self.object, Column) and hasattr(self.object, COLUMN_META_ATTR)): # ...we really want to document it. _no_docstring = False elif not self._datadescriptor: # if it's not a data descriptor, its docstring is very probably the # wrong thing to display _no_docstring = True ClassLevelDocumenter.add_content(self, more_content, _no_docstring)
def add_content(self, more_content, no_docstring=False): """ Never try to get a docstring from the trait.""" ClassLevelDocumenter.add_content(self, more_content, no_docstring=True)