mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2024-11-26 11:33:58 +03:00
Refactoring of Callable provider using get_injectable_kwargs()
This commit is contained in:
parent
5561069d50
commit
06d66b87e9
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue
Block a user