class documentation

class System:

Known subclasses: pydoctor.zopeinterface.ZopeInterfaceSystem

View In Hierarchy

A collection of related documentable objects.

PyDoctor documents collections of objects, often the contents of a package.

Method __init__ Undocumented
Method add​Module​From​Path Undocumented
Method add​Object Add object to the system.
Method add​Package Undocumented
Method analyze​Module Undocumented
Method fetch​Intersphinx​Inventories Download and parse intersphinx inventories based on configuration.
Method find​_object Look up an object using a potentially outdated full name.
Method get​Processed​Module Undocumented
Method handle​Duplicate This is called when we see two objects with the same .fullName(), for example:
Method introspect​Module Undocumented
Method msg Undocumented
Method objects​Of​Type Iterate over all instances of cls present in the system.
Method obj​For​Full​Name Undocumented
Method post​Process Called when there are no more unprocessed modules.
Method privacy​Class Undocumented
Method process Undocumented
Method process​Module Undocumented
Method progress Undocumented
Method set​Source​Href Undocumented
Method verbosity Undocumented
Class Variable default​Builder Undocumented
Class Variable sourcebase Undocumented
Instance Variable allobjects Undocumented
Instance Variable buildtime Undocumented
Instance Variable docstring​_syntax​_errors FullNames of objects for which the docstring failed to parse.
Instance Variable intersphinx Undocumented
Instance Variable module​_count Undocumented
Instance Variable needsnl Undocumented
Instance Variable once​_msgs Undocumented
Instance Variable options Undocumented
Instance Variable processing​_modules Undocumented
Instance Variable projectname Undocumented
Instance Variable rootobjects Undocumented
Instance Variable unprocessed​_modules Undocumented
Instance Variable verboselevel Undocumented
Instance Variable violations No summary
Property root​_names The top-level package/module names in this system.
Method _introspect​Thing Undocumented
Method ​_warning Undocumented
def __init__(self, options=None):

Undocumented

Parameters
options:Optional[Values]Undocumented
def addModuleFromPath(self, path, package):

Undocumented

Parameters
path:PathUndocumented
package:Optional[_PackageT]Undocumented
def addObject(self, obj):
Add object to the system.
Parameters
obj:DocumentableUndocumented
def addPackage(self, package_path, parentPackage=None):

Undocumented

Parameters
package​_path:PathUndocumented
parent​Package:Optional[_PackageT]Undocumented
def analyzeModule(self, modpath, modname, parentPackage=None, is_package=False):

Undocumented

Parameters
modpath:PathUndocumented
modname:strUndocumented
parent​Package:Optional[_PackageT]Undocumented
is​_package:boolUndocumented
Returns
_ModuleTUndocumented
def fetchIntersphinxInventories(self, cache):
Download and parse intersphinx inventories based on configuration.
Parameters
cache:CacheTUndocumented
def find_object(self, full_name):

Look up an object using a potentially outdated full name.

A name can become outdated if the object is reparented: objForFullName() will only be able to find it under its new name, but we might still have references to the old name.

Parameters
full​_name:strThe fully qualified name of the object.
Returns
Optional[Documentable]The object, or None if the name is external (it does not match any of the roots of this system).
Raises
LookupErrorIf the object is not found, while its name does match one of the roots of this system.
def getProcessedModule(self, modname):

Undocumented

Parameters
modname:strUndocumented
Returns
Optional[_ModuleT]Undocumented
def handleDuplicate(self, obj):

This is called when we see two objects with the same .fullName(), for example:

    class C:
        if something:
            def meth(self):
                implementation 1
        else:
            def meth(self):
                implementation 2

The default is that the second definition "wins".

Parameters
obj:DocumentableUndocumented
def introspectModule(self, path, module_name, package):

Undocumented

Parameters
path:PathUndocumented
module​_name:strUndocumented
package:Optional[_PackageT]Undocumented
Returns
_ModuleTUndocumented
def msg(self, section, msg, thresh=0, topthresh=100, nonl=False, wantsnl=True, once=False):

Undocumented

Parameters
section:strUndocumented
msg:strUndocumented
thresh:intUndocumented
topthresh:intUndocumented
nonl:boolUndocumented
wantsnl:boolUndocumented
once:boolUndocumented
def objectsOfType(self, cls):
Iterate over all instances of cls present in the system.
Parameters
cls:Type[T]Undocumented
Returns
Iterator[T]Undocumented
def objForFullName(self, fullName):

Undocumented

Parameters
full​Name:strUndocumented
Returns
Optional[Documentable]Undocumented
def postProcess(self):

Called when there are no more unprocessed modules.

Analysis of relations between documentables can be done here, without the risk of drawing incorrect conclusions because modules were not fully processed yet.

def privacyClass(self, ob):

Undocumented

Parameters
ob:DocumentableUndocumented
Returns
PrivacyClassUndocumented
def process(self):

Undocumented

def processModule(self, mod):

Undocumented

Parameters
mod:_ModuleTUndocumented
def progress(self, section, i, n, msg):

Undocumented

Parameters
section:strUndocumented
i:intUndocumented
n:Optional[int]Undocumented
msg:strUndocumented
def setSourceHref(self, mod, source_path):

Undocumented

Parameters
mod:_ModuleTUndocumented
source​_path:PathUndocumented
def verbosity(self, section):

Undocumented

Parameters
section:Union[str, Iterable[str]]Undocumented
Returns
intUndocumented
defaultBuilder: Type[ASTBuilder] =

Undocumented

sourcebase: Optional[str] =

Undocumented

allobjects: Dict[str, Documentable] =

Undocumented

buildtime =

Undocumented

docstring_syntax_errors: Set[str] =
FullNames of objects for which the docstring failed to parse.
intersphinx =

Undocumented

module_count: int =

Undocumented

needsnl: bool =

Undocumented

once_msgs: Set[Tuple[str, str]] =

Undocumented

options =

Undocumented

processing_modules: List[str] =

Undocumented

projectname: str =

Undocumented

rootobjects: List[_ModuleT] =

Undocumented

unprocessed_modules: Set[Module] =

Undocumented

verboselevel: int =

Undocumented

violations: int =
The number of docstring problems found. This is used to determine whether to fail the build when using the --warnings-as-errors option, so it should only be increased for problems that the user can fix.
@property
root_names: Collection[str] =
The top-level package/module names in this system.
def _introspectThing(self, thing, parent, parentMod):

Undocumented

Parameters
thing:objectUndocumented
parent:DocumentableUndocumented
parent​Mod:_ModuleTUndocumented
def _warning(self, current, message, detail):

Undocumented

Parameters
current:Optional[Documentable]Undocumented
message:strUndocumented
detail:strUndocumented