sphinx_packaging.tconf¶
The tconf directive and role for configuration fields in pyproject.toml etc.
Classes:
|
Customised XRef role for |
|
The |
Functions:
|
Resolve as-yet-unresolved XRefs for |
|
Setup |
-
class
TConfXRefRole(fix_parens=False, lowercase=False, nodeclass=None, innernodeclass=None, warn_dangling=False)[source]¶ Bases:
XRefRoleCustomised XRef role for
tconfroles.Methods:
process_link(env, refnode, …)Construct a link from the parsed content of the role.
-
process_link(env, refnode, has_explicit_title, title, target)[source]¶ Construct a link from the parsed content of the role.
- Parameters
env (
BuildEnvironment) – The Sphinx build environment.refnode (
Element) – The reference node.has_explicit_title (
bool) – Whether the role has an explicit title.title (
str) – The title of the XRef role.target (
str) – The target of the XRef role. (:tconf:`title <target>`)
- Return type
- Returns
A tuple of
(title, target).
-
-
class
TOMLConf(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source]¶ Bases:
GenericObjectThe
tconfdirective.Methods:
format_default(default)Formats the
:default:option.format_required(required)Formats the
:required:option.format_type(the_type)Formats the
:type:option.handle_signature(sig, signode)Parse the signature of the
tconfdirective.run()Process the content of the directive.
Attributes:
The template string for index entries.
-
handle_signature(sig, signode)[source]¶ Parse the signature of the
tconfdirective.- Parameters
sig (
str) – The name of the field.signode (
desc_signature) – The signature node created by Sphinx.
- Return type
- Returns
The final component of the field path (e.g.
foo.bar->bar).
-
-
resolve_xref(app, env, node, contnode)[source]¶ Resolve as-yet-unresolved XRefs for
tconfroles.- Parameters
app (
Sphinx) – The Sphinx application.env (
BuildEnvironment) – The Sphinx build environment.node (
Node) – The cross reference node which has not yet been.contnode (
Node) – The child node of the reference node, which provides the formatted text.
- Return type
Optional[reference]