MCPcopy Create free account
hub / github.com/UX-Decoder/Semantic-SAM / wrapper

Function wrapper

semantic_sam/utils/config.py:81–91  ·  view source on GitHub ↗
(orig_func)

Source from the content-addressed store, hash-verified

79 ), "from_config argument of configurable must be a function!"
80
81 def wrapper(orig_func):
82 @functools.wraps(orig_func)
83 def wrapped(*args, **kwargs):
84 if _called_with_cfg(*args, **kwargs):
85 explicit_args = _get_args_from_config(from_config, *args, **kwargs)
86 return orig_func(**explicit_args)
87 else:
88 return orig_func(*args, **kwargs)
89
90 wrapped.from_config = from_config
91 return wrapped
92
93 return wrapper
94

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected