class documentation

class PriorityProcessor: (source)

Constructor: PriorityProcessor(system)

View In Hierarchy

Stores Callable and applies them to the system based on priority or insertion order. The default priority is 100, see code source of astbuilder.setup_pydoctor_extension, and others setup_pydoctor_extension functions.

Highest priority callables will be called first, when priority is the same it's FIFO order.

One PriorityProcessor should only be run once on the system.

Method __init__ Undocumented
Method add_post_processor Undocumented
Method apply_processors Apply all of the stored processors, in priority order.
Instance Variable applied Undocumented
Instance Variable system Undocumented
Method _get_priority_key Return a tuple, `priority` combined with `self._counter`.
Instance Variable _counter Internal counter to keep track of the add order of callables.
Instance Variable _post_processors Undocumented
def __init__(self, system: model.System): (source)

Undocumented

def add_post_processor(self, post_processor: Callable[[model.System], None], priority: int | None): (source)

Undocumented

def apply_processors(self): (source)

Apply all of the stored processors, in priority order.

Undocumented

Undocumented

def _get_priority_key(self, priority: int) -> object: (source)

Return a tuple, `priority` combined with `self._counter`.

This ensures FIFO order on callables with identical priority.

_counter: int = (source)

Internal counter to keep track of the add order of callables.

Undocumented