pytools.sphinx.AutodocBeforeProcessSignature#

class pytools.sphinx.AutodocBeforeProcessSignature(*args, **kwargs)[source]#

An autodoc processor invoked before processing signatures.

Bases

SphinxCallback

Metaclasses

ABCMeta

Method summary

connect

Register this callback to be called when event is emitted.

disconnect

Disconnect this callback from its Sphinx application.

process

Process an event.

Attribute summary

app

The Sphinx application this callback is connected to.

event

"autodoc-before-process-signature"

listener_id

The listener ID of this callback.

Definitions

__call__(app, obj, bound_method)[source]#

Call self as a function.

Return type

Optional[tuple[str, str]]

connect(app, priority=None)#

Register this callback to be called when event is emitted.

Registered callbacks will be invoked on event in the order of priority and registration. The priority is ascending order.

Parameters
  • app (Any) – the Sphinx application to register this processor with

  • priority (Optional[int]) – the priority of this processor

Return type

int

Returns

a listener ID that can be used as an argument to disconnect().

disconnect()#

Disconnect this callback from its Sphinx application.

Return type

None

abstract process(app, obj, bound_method)[source]#

Process an event.

Parameters
  • app (Any) – the Sphinx application object

  • obj (Any) – the object itself

  • bound_method (bool) – indicates an object is bound method or not

Return type

None

property app: Optional[Any]#

The Sphinx application this callback is connected to.

Return type

Optional[Any]

Returns

the Sphinx application, or None if not connected.

property event: str#

"autodoc-before-process-signature"

Return type

str

property listener_id: int | None#

The listener ID of this callback.

Return type

Optional[int]

Returns

the listener ID, or None if not connected.