mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2024-11-23 01:56: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):
|
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):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user