Refactoring of Callable provider using get_injectable_kwargs()

This commit is contained in:
Roman Mogilatov 2015-07-27 18:50:27 +03:00
parent 5561069d50
commit 06d66b87e9

View File

@ -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):