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

Method run

Doc/tools/extensions/availability.py:58–80  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

56 final_argument_whitespace = True
57
58 def run(self) -> list[nodes.container]:
59 title = sphinx_gettext("Availability")
60 refnode = addnodes.pending_xref(
61 title,
62 nodes.inline(title, title, classes=["xref", "std", "std-ref"]),
63 refdoc=self.env.docname,
64 refdomain="std",
65 refexplicit=True,
66 reftarget="availability",
67 reftype="ref",
68 refwarn=True,
69 )
70 sep = nodes.Text(": ")
71 parsed, msgs = self.state.inline_text(self.arguments[0], self.lineno)
72 pnode = nodes.paragraph(title, "", refnode, sep, *parsed, *msgs)
73 self.set_source_info(pnode)
74 cnode = nodes.container("", pnode, classes=["availability"])
75 self.set_source_info(cnode)
76 if self.content:
77 self.state.nested_parse(self.content, self.content_offset, cnode)
78 self.parse_platforms()
79
80 return [cnode]
81
82 def parse_platforms(self) -> dict[str, str | bool]:
83 """Parse platform information from arguments

Callers

nothing calls this directly

Calls 1

parse_platformsMethod · 0.95

Tested by

no test coverage detected