MCPcopy
hub / github.com/sphinx-doc/sphinx / __init__

Method __init__

sphinx/events.py:75–82  ·  view source on GitHub ↗
(self, app: Sphinx)

Source from the content-addressed store, hash-verified

73 """Event manager for Sphinx."""
74
75 def __init__(self, app: Sphinx) -> None:
76 self._app = app
77 self.events = core_events.copy()
78 self.listeners: dict[str, list[EventListener]] = defaultdict(list)
79 self.next_listener_id = 0
80
81 # pass through errors for debugging.
82 self._reraise_errors: bool = app.pdb
83
84 def add(self, name: str) -> None:
85 """Register a custom Sphinx event called *name*.

Callers

nothing calls this directly

Calls 1

copyMethod · 0.45

Tested by

no test coverage detected