MCPcopy Create free account
hub / github.com/pyfa-org/Pyfa / new_func

Function new_func

utils/deprecated.py:10–16  ·  view source on GitHub ↗
(*args, **kwargs)

Source from the content-addressed store, hash-verified

8 when the function is used."""
9 @functools.wraps(func)
10 def new_func(*args, **kwargs):
11 warnings.simplefilter('always', DeprecationWarning) # turn off filter
12 warnings.warn("Call to deprecated function {}.".format(func.__name__),
13 category=DeprecationWarning,
14 stacklevel=2)
15 warnings.simplefilter('default', DeprecationWarning) # reset filter
16 return func(*args, **kwargs)
17 return new_func

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected