From 8bda78a9334665bbde79d651607868bd5674263d Mon Sep 17 00:00:00 2001 From: Grzegorz Bokota Date: Mon, 22 Apr 2024 16:21:20 +0200 Subject: [PATCH] feat: Try to inject parameter value if default value is None --- src/in_n_out/_store.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/in_n_out/_store.py b/src/in_n_out/_store.py index fee18fd..ff30f09 100644 --- a/src/in_n_out/_store.py +++ b/src/in_n_out/_store.py @@ -778,7 +778,7 @@ def _exec(*args: P.args, **kwargs: P.kwargs) -> R: # first, get and call the provider functions for each parameter type: _injected_names: set[str] = set() for param in sig.parameters.values(): - if param.name not in bound.arguments: + if param.name not in bound.arguments or bound.arguments[param.name] is None: provided = self.provide(param.annotation) if provided is not None or is_optional(param.annotation): logger.debug(