MCPcopy Create free account
hub / github.com/alphagov/notifications-api / unwrap_function

Function unwrap_function

tests/__init__.py:45–51  ·  view source on GitHub ↗

Given a function, returns its undecorated original.

(fn)

Source from the content-addressed store, hash-verified

43
44
45def unwrap_function(fn):
46 """
47 Given a function, returns its undecorated original.
48 """
49 while hasattr(fn, "__wrapped__"):
50 fn = fn.__wrapped__
51 return fn

Calls

no outgoing calls