Пример #1
0
 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)
Пример #2
0
    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)
Пример #3
0
 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)
Пример #4
0
 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)