Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def decorator(fn: Callable[..., T]) -> Callable[..., T]:
caller_filepath = get_caller_filepath()
if caller_filepath == InjectionContainer.LOADING_FILEPATH:
InjectionContainer._register_factory(
fn,
caller_filepath,
dependency,
qualifier,
primary,
namespace,
group,
singleton,
)
return fn