From 06d66b87e91f59f24ae79493d40a25bb3e6503cf Mon Sep 17 00:00:00 2001 From: Roman Mogilatov Date: Mon, 27 Jul 2015 18:50:27 +0300 Subject: [PATCH] Refactoring of Callable provider using get_injectable_kwargs() --- objects/providers.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/objects/providers.py b/objects/providers.py index d5076fb2..3a2c7a2b 100644 --- a/objects/providers.py +++ b/objects/providers.py @@ -264,11 +264,8 @@ class Callable(Provider): def _provide(self, *args, **kwargs): """Return provided instance.""" - injections = dict(((injection.name, injection.value) - for injection in self._injections)) - injections.update(kwargs) - - return self._callback(*args, **injections) + return self._callback(*args, **get_injectable_kwargs(kwargs, + self._injections)) class Config(Provider):