MCPcopy
hub / github.com/celery/celery / modify_textnode

Function modify_textnode

docs/_ext/celerydocs.py:118–124  ·  view source on GitHub ↗
(T, newtarget, node, src_dict, type)

Source from the content-addressed store, hash-verified

116
117
118def modify_textnode(T, newtarget, node, src_dict, type):
119 src = node.children[0].rawsource
120 return nodes.Text(
121 (typeify(basename(T), type) if '~' in src
122 else typeify(shorten(T, newtarget, src_dict), type)),
123 src,
124 )
125
126
127def maybe_resolve_abbreviations(app, env, node, contnode):

Callers 1

Calls 3

typeifyFunction · 0.85
basenameFunction · 0.85
shortenFunction · 0.85

Tested by

no test coverage detected