mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
GH-103082: Clean up the sys.monitoring docs (GH-110532)
This commit is contained in:
parent
94495d0387
commit
1991694117
2 changed files with 165 additions and 101 deletions
|
@ -607,6 +607,13 @@ def parse_pdb_command(env, sig, signode):
|
|||
return fullname
|
||||
|
||||
|
||||
def parse_monitoring_event(env, sig, signode):
|
||||
"""Transform a monitoring event signature into RST nodes."""
|
||||
signode += addnodes.desc_addname('sys.monitoring.events.', 'sys.monitoring.events.')
|
||||
signode += addnodes.desc_name(sig, sig)
|
||||
return sig
|
||||
|
||||
|
||||
def process_audit_events(app, doctree, fromdocname):
|
||||
for node in doctree.traverse(audit_event_list):
|
||||
break
|
||||
|
@ -707,6 +714,7 @@ def setup(app):
|
|||
app.add_builder(PydocTopicsBuilder)
|
||||
app.add_object_type('opcode', 'opcode', '%s (opcode)', parse_opcode_signature)
|
||||
app.add_object_type('pdbcommand', 'pdbcmd', '%s (pdb command)', parse_pdb_command)
|
||||
app.add_object_type('monitoring-event', 'monitoring-event', '%s (monitoring event)', parse_monitoring_event)
|
||||
app.add_directive_to_domain('py', 'decorator', PyDecoratorFunction)
|
||||
app.add_directive_to_domain('py', 'decoratormethod', PyDecoratorMethod)
|
||||
app.add_directive_to_domain('py', 'coroutinefunction', PyCoroutineFunction)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue