Skip to content

Commit

Permalink
feat: Try to inject parameter value if default value is None
Browse files Browse the repository at this point in the history
  • Loading branch information
Czaki committed Apr 22, 2024
1 parent 0688e13 commit 8bda78a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/in_n_out/_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 8bda78a

Please sign in to comment.