MCPcopy Index your code
hub / github.com/python/cpython / init_annotations

Function init_annotations

Doc/tools/extensions/c_annotations.py:426–438  ·  view source on GitHub ↗
(app: Sphinx)

Source from the content-addressed store, hash-verified

424
425
426def init_annotations(app: Sphinx) -> None:
427 # Using domaindata is a bit hack-ish,
428 # but allows storing state without a global variable or closure.
429 app.env.domaindata["c_annotations"] = state = {}
430 state["refcount_data"] = read_refcount_data(
431 Path(app.srcdir, app.config.refcount_file)
432 )
433 state["stable_abi_data"] = read_stable_abi_data(
434 Path(app.srcdir, app.config.stable_abi_file)
435 )
436 state["threadsafety_data"] = read_threadsafety_data(
437 Path(app.srcdir, app.config.threadsafety_file)
438 )
439
440
441def setup(app: Sphinx) -> ExtensionMetadata:

Callers

nothing calls this directly

Calls 4

PathClass · 0.90
read_refcount_dataFunction · 0.85
read_stable_abi_dataFunction · 0.85
read_threadsafety_dataFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…