File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -24,19 +24,19 @@ def wrapper_inject(*args: Any, **kwargs: Any) -> Any:
2424 sig = inspect .signature (func )
2525 parameter_names = [param .name for param in sig .parameters .values ()]
2626
27- # Iterate over the parameter names and inject dependencies into kwargs
27+ # Iterate over the parameter names and inject services into kwargs
2828 for parameter_name in parameter_names :
2929 if parameter_name != "cls" and parameter_name not in kwargs :
3030 # get container
3131 container = DependencyContainer .get_instance (container_name )
3232 actual_scope_name = scope_name or container .get_default_scope_name ()
33- # Resolve the dependency based on the parameter name
34- dependency_type = sig .parameters [parameter_name ].annotation
33+ # Resolve the service in the parameter type annotation
34+ service = sig .parameters [parameter_name ].annotation
3535 kwargs [parameter_name ] = container .resolve (
36- dependency_type , scope_name = actual_scope_name
36+ service , scope_name = actual_scope_name
3737 )
3838
39- # Call the original function with the injected dependencies
39+ # Call the original function with the injected services
4040 return func (* args , ** kwargs )
4141
4242 # Not allowed on instance methods
You can’t perform that action at this time.
0 commit comments