class documentation

class Documentable:

Known subclasses: pydoctor.model.CanContainImportsDocumentable, pydoctor.model.Inheritable, pydoctor.test.test_sphinx.UnknownType

View In Hierarchy

An object that can be documented.

The interface is a bit ridiculously wide.

Method __init__ Undocumented
Method __repr__ Undocumented
Method docsources Objects that can be considered as a source of documentation.
Method expand​Name Return a fully qualified name for the possibly-dotted `name`.
Method full​Name Undocumented
Method reparent Undocumented
Method report Log an error or warning about this documentable object.
Method resolve​Name Return the object named by "name" (using Python's lookup rules) in this context, if any is known to pydoctor.
Method set​Docstring Undocumented
Method set​Line​Number Undocumented
Method setup Undocumented
Class Variable kind Undocumented
Class Variable parsed​_docstring Undocumented
Class Variable parsed​_type Undocumented
Instance Variable contents Undocumented
Instance Variable docstring The object's docstring. But also see docsources.
Instance Variable docstring​_lineno Undocumented
Instance Variable linenumber Undocumented
Instance Variable name Undocumented
Instance Variable parent Undocumented
Instance Variable parent​Mod Undocumented
Instance Variable source​_path Undocumented
Instance Variable source​Href Undocumented
Instance Variable system The system the object is part of.
Property description A string describing our source location to the user.
Property doctarget Undocumented
Property is​Private Is this object considered private API?
Property is​Visible Is this object so private as to be not shown at all?
Property module This object's Module.
Property page​_object The documentable to which the page we're documented on belongs. For example methods are documented on the page of their class, functions are documented in their module's page etc.
Property privacy​Class How visible this object should be.
Property url Relative URL at which the documentation for this Documentable can be found.
Method ​_handle​_reparenting​_post Undocumented
Method ​_handle​_reparenting​_pre Undocumented
Method _local​Name​To​Full​Name Undocumented
Instance Variable ​_deprecated​_info Undocumented
def __init__(self, system, name, parent=None, source_path=None):

Undocumented

Parameters
system:SystemUndocumented
name:strUndocumented
parent:Optional[Documentable]Undocumented
source​_path:Optional[Path]Undocumented
def __repr__(self):

Undocumented

Returns
strUndocumented
def docsources(self):

Objects that can be considered as a source of documentation.

The motivating example for having multiple sources is looking at a superclass' implementation of a method for documentation for a subclass'.

Returns
Iterator[Documentable]Undocumented
def expandName(self, name):

Return a fully qualified name for the possibly-dotted `name`.

To explain what this means, consider the following modules:

mod1.py:

    from external_location import External
    class Local:
        pass

mod2.py:

    from mod1 import External as RenamedExternal
    import mod1 as renamed_mod
    class E:
        pass

In the context of mod2.E, expandName("RenamedExternal") should be "external_location.External" and expandName("renamed_mod.Local") should be "mod1.Local".

Parameters
name:strUndocumented
Returns
strUndocumented
def fullName(self):

Undocumented

Returns
strUndocumented
def reparent(self, new_parent, new_name):

Undocumented

Parameters
new​_parent:ModuleUndocumented
new​_name:strUndocumented
def report(self, descr, section='parsing', lineno_offset=0):
Log an error or warning about this documentable object.
Parameters
descr:strUndocumented
section:strUndocumented
lineno​_offset:intUndocumented
def resolveName(self, name):
Return the object named by "name" (using Python's lookup rules) in this context, if any is known to pydoctor.
Parameters
name:strUndocumented
Returns
Optional[Documentable]Undocumented
def setDocstring(self, node):

Undocumented

Parameters
node:ast.StrUndocumented
def setLineNumber(self, lineno):

Undocumented

Parameters
lineno:intUndocumented
def setup(self):
kind: Optional[DocumentableKind] =

Undocumented

parsed_docstring: Optional[ParsedDocstring] =

Undocumented

parsed_type: Optional[ParsedDocstring] =

Undocumented

contents: Dict[str, Documentable] =

Undocumented

docstring =
The object's docstring. But also see docsources.
docstring_lineno =

Undocumented

linenumber =

Undocumented

name =

Undocumented

parent =

Undocumented

parentMod =

Undocumented

source_path: Optional[Path] =

Undocumented

sourceHref =

Undocumented

system =
The system the object is part of.
@property
description: str =

A string describing our source location to the user.

If this module's code was read from a file, this returns its file path. In other cases, such as during unit testing, the full module name is returned.

@property
doctarget: Documentable =

Undocumented

@property
isPrivate: bool =

Is this object considered private API?

This is just a simple helper which defers to self.privacyClass.

@property
isVisible: bool =

Is this object so private as to be not shown at all?

This is just a simple helper which defers to self.privacyClass.

@property
module: Module =
overridden in pydoctor.model.Module

This object's Module.

For modules, this returns the object itself, otherwise the module containing the object is returned.

@property
page_object: Documentable =
The documentable to which the page we're documented on belongs. For example methods are documented on the page of their class, functions are documented in their module's page etc.
@property
privacyClass: PrivacyClass =
overridden in pydoctor.model.Module
How visible this object should be.
@property
url: str =
Relative URL at which the documentation for this Documentable can be found.
def _handle_reparenting_post(self):

Undocumented

def _handle_reparenting_pre(self):

Undocumented

def _localNameToFullName(self, name):

Undocumented

Parameters
name:strUndocumented
Returns
strUndocumented
_deprecated_info: Optional[Flattenable] =

Undocumented