module documentation

Core pydoctor objects.

The two core objects are Documentable and System. Instances of (subclasses of) Documentable represent the documentable 'things' in the system being documented. An instance of System represents the whole system being documented -- a System is a bad of Documentables, in some sense.

Class Attribute No class docstring; 1/3 class variable documented
Class CanContainImportsDocumentable Undocumented
Class Class No class docstring; 4/4 properties, 0/7 instance variable, 0/3 class variable, 4/6 methods documented
Class DocLocation Undocumented
Class Documentable An object that can be documented.
Class DocumentableKind Enum containing values indicating the possible object types.
Class Function Undocumented
Class FunctionOverload No summary
Class Inheritable Undocumented
Class ISystemBuilder Interface class for building a system.
Class LineFromAst Simple int wrapper for linenumbers coming from ast analysis.
Class LineFromDocstringField Simple int wrapper for linenumbers coming from docstrings.
Class Module No class docstring; 1/3 property, 4/5 instance variables, 1/4 method documented
Class Package Undocumented
Class PrivacyClass Enum containing values indicating how private an object should be.
Class ProcessingState Undocumented
Class System A collection of related documentable objects.
Class SystemBuilder This class is only an adapter for some System methods related to module building.
Exception SystemBuildingError Raised when there is a (handled) fatal error while adding modules to the builder.
Function compute_mro Compute the method resolution order for this class. This function will also set the _finalbaseobjects and _finalbases attributes on this class and all it's superclasses.
Function defaultPostProcess Undocumented
Function get_constructors Look for python language powered constructors or classmethod constructors. A constructor MUST be a method accessible in the locals of the class.
Function get_docstring Fetch the docstring for a documentable. Treat empty docstring as undocumented.
Function import_mod_from_file_location Undocumented
Function is_exception Whether is class should be considered as an exception and be marked with the special kind DocumentableKind.EXCEPTION.
Function prepend_package Get a new system builder class, that extends the original builder such that it will always use a "fake" package to be the only root object of the system and add new modules under it.
Type Variable T Undocumented
Variable func_types Undocumented
Function _find_dunder_constructor Find the a non-default python-powered dunder constructor. Returns None if neither __new__ or __init__ are defined.
Function _inherits_instance_variable_kind If any of the inherited members of a class variable is an instance variable, then the subclass' class variable become an instance variable as well.
Constant _STD_LIB_EXCEPTIONS Undocumented
Variable _default_extensions Undocumented
def compute_mro(cls: Class) -> Sequence[Class | str]: (source)

Compute the method resolution order for this class. This function will also set the _finalbaseobjects and _finalbases attributes on this class and all it's superclasses.

def defaultPostProcess(system: System): (source)

Undocumented

def get_constructors(cls: Class) -> Iterator[Function]: (source)

Look for python language powered constructors or classmethod constructors. A constructor MUST be a method accessible in the locals of the class.

def get_docstring(obj: Documentable) -> tuple[str | None, Documentable | None]: (source)

Fetch the docstring for a documentable. Treat empty docstring as undocumented.

:returns:

  • (docstring, source) if the object is documented.
  • (None, None) if the object has no docstring (even inherited).
  • (None, source) if the object has an empty docstring.
def import_mod_from_file_location(module_full_name: str, path: Path) -> types.ModuleType: (source)

Undocumented

def is_exception(cls: Class) -> bool: (source)

Whether is class should be considered as an exception and be marked with the special kind DocumentableKind.EXCEPTION.

def prepend_package(builderT: type[ISystemBuilder], package: str) -> type[ISystemBuilder]: (source)

Get a new system builder class, that extends the original builder such that it will always use a "fake" package to be the only root object of the system and add new modules under it.

Undocumented

Value
TypeVar('T')
func_types: tuple[type[Any], ...] = (source)

Undocumented

def _find_dunder_constructor(cls: Class) -> Function | None: (source)

Find the a non-default python-powered dunder constructor. Returns None if neither __new__ or __init__ are defined.

Note
__new__ takes precedence orver __init__. More infos: https://docs.python.org/3/reference/datamodel.html#object.__new__
def _inherits_instance_variable_kind(attr: Attribute): (source)

If any of the inherited members of a class variable is an instance variable, then the subclass' class variable become an instance variable as well.

_STD_LIB_EXCEPTIONS: tuple[str, ...] = (source)

Undocumented

Value
('ArithmeticError',
 'AssertionError',
 'AttributeError',
 'BaseException',
 'BlockingIOError',
 'BrokenPipeError',
 'BufferError',
...
_default_extensions = (source)

Undocumented