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): def _provide(self, *args, **kwargs):
"""Return provided instance.""" """Return provided instance."""
injections = dict(((injection.name, injection.value) return self._callback(*args, **get_injectable_kwargs(kwargs,
for injection in self._injections)) self._injections))
injections.update(kwargs)
return self._callback(*args, **injections)
class Config(Provider): class Config(Provider):