File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -1007,6 +1007,14 @@ def call_with_injection(
10071007 ) -> T :
10081008 """Call a callable and provide its dependencies if needed.
10091009
1010+ Dependencies are provided when the callable is decorated with :func:`@inject <inject>`
1011+ or some individual parameters are wrapped in :data:`Inject` – otherwise
1012+ ``call_with_injection()`` is equivalent to just calling the callable directly.
1013+
1014+ If there is an overlap between arguments provided in ``args`` and ``kwargs``
1015+ and injectable dependencies the provided values take precedence and no dependency
1016+ injection process will take place for the corresponding parameters.
1017+
10101018 :param self_: Instance of a class callable belongs to if it's a method,
10111019 None otherwise.
10121020 :param args: Arguments to pass to callable.
You can’t perform that action at this time.
0 commit comments