MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/OpenColorIO / patch_node

Function patch_node

share/docs/prettymethods.py:62–77  ·  view source on GitHub ↗
(node, text=None, children=None, *, constructor=None)

Source from the content-addressed store, hash-verified

60
61
62def patch_node(node, text=None, children=None, *, constructor=None):
63 if constructor is None:
64 constructor = node.__class__
65
66 if text is None:
67 text = node.text
68
69 if children is None:
70 children = get_children(node)
71
72 return constructor(
73 node.source,
74 text,
75 *children,
76 **node.attributes,
77 )
78
79
80def function_transformer(new_name):

Callers 3

xfFunction · 0.85
prettymethods.pyFile · 0.85
applyMethod · 0.85

Calls 1

get_childrenFunction · 0.85

Tested by

no test coverage detected