module documentation

Miscellaneous utilities for the HTML writer.

Class CaseInsensitiveDict A case-insensitive ``dict``-like object. Implements all methods and operations of ``collections.MutableMapping`` as well as dict's ``copy``. Also provides ``lower_items``. All keys are expected to be strings...
Class DocGetter epydoc2stan bridge.
Function alphabetical_order_func Sort by privacy, kind and fullname. Callable to use as the value of standard library's sorted function key argument.
Function class_members Returns the members as well as the inherited members of a class.
Function css_class A short, lower case description for use as a CSS class in HTML. Includes the kind and privacy.
Function inherited_members Returns only the inherited members of a class, as a plain list.
Function nested_bases Helper function to retreive the complete list of base classes chains (represented by tuples) for a given Class. A chain of classes is used to compute the member inheritence from the first element to the last element of the chain.
Function objects_order Function to craft a callable to use as the value of standard library's sorted function key argument such that the objects are sorted by: Privacy, Kind first, then by Name or Linenumber depending on order...
Function overriding_subclasses Helper function to retreive the subclasses that override the given name from the parent class object.
Function source_order_func Sort by privacy, kind and linenumber. Callable to use as the value of standard library's sorted function key argument.
Function srclink Get object source code URL, i.e. hosted on github.
Function templatefile Deprecated: can be removed once Twisted stops patching this.
Function unmasked_attrs Helper function to reteive the list of inherited children given a base classes chain (As yielded by nested_bases). The returned members are inherited from the Class listed first in the chain to the Class listed last: they are not overriden in between.
Function _map_kind Undocumented
Type Variable _VT Undocumented
def alphabetical_order_func(o: model.Documentable) -> tuple[Any, ...]: (source)

Sort by privacy, kind and fullname. Callable to use as the value of standard library's sorted function key argument.

Returns the members as well as the inherited members of a class.

Returns
list[tuple[tuple[model.Class, ...], Sequence[model.Documentable]]]Tuples of tuple: inherited_via:Tuple[model.Class, ...], attributes:Sequence[model.Documentable].

A short, lower case description for use as a CSS class in HTML. Includes the kind and privacy.

def inherited_members(cls: model.Class) -> list[model.Documentable]: (source)

Returns only the inherited members of a class, as a plain list.

def nested_bases(classobj: model.Class) -> Iterator[tuple[model.Class, ...]]: (source)

Helper function to retreive the complete list of base classes chains (represented by tuples) for a given Class. A chain of classes is used to compute the member inheritence from the first element to the last element of the chain.

The first yielded chain only contains the Class itself.

Then for each of the super-classes:

  • the next yielded chain contains the super class and the class itself,
  • the the next yielded chain contains the super-super class, the super class and the class itself, etc...
def objects_order(order: Literal['alphabetical', 'source']) -> Callable[[model.Documentable], tuple[Any, ...]]: (source)

Function to craft a callable to use as the value of standard library's sorted function key argument such that the objects are sorted by: Privacy, Kind first, then by Name or Linenumber depending on order argument.

Example:

    children = sorted((o for o in ob.contents.values() if o.isVisible),
                  key=objects_order("alphabetical"))
def overriding_subclasses(classobj: model.Class, name: str, firstcall: bool = True) -> Iterator[model.Class]: (source)

Helper function to retreive the subclasses that override the given name from the parent class object.

def source_order_func(o: model.Documentable) -> tuple[Any, ...]: (source)

Sort by privacy, kind and linenumber. Callable to use as the value of standard library's sorted function key argument.

Get object source code URL, i.e. hosted on github.

def templatefile(filename: str): (source)

Deprecated: can be removed once Twisted stops patching this.

Helper function to reteive the list of inherited children given a base classes chain (As yielded by nested_bases). The returned members are inherited from the Class listed first in the chain to the Class listed last: they are not overriden in between.

Undocumented

Value
TypeVar('_VT')