MCPcopy Index your code
hub / github.com/datacamp/pythonwhat / wrapper

Function wrapper

pythonwhat/sct_syntax.py:17–25  ·  view source on GitHub ↗
(*args, **kwargs)

Source from the content-addressed store, hash-verified

15
16 @wraps(f)
17 def wrapper(*args, **kwargs):
18 args = (
19 args[0] if len(args) == 1 and isinstance(args[0], (list, tuple)) else args
20 )
21 for arg in args:
22 if isinstance(arg, Node) and arg.parent.name == "root":
23 arg.parent.remove_child(arg)
24 arg.update_child_calls()
25 return f(*args, **kwargs)
26
27 return wrapper
28

Callers

nothing calls this directly

Calls 3

fFunction · 0.85
remove_childMethod · 0.80
update_child_callsMethod · 0.45

Tested by

no test coverage detected