Skip to content

Commit

Permalink
Use fields directly instead of props
Browse files Browse the repository at this point in the history
  • Loading branch information
maldoinc committed Jul 31, 2024
1 parent 92f5e30 commit 0994031
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wireup/ioc/dependency_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ def __callable_get_params_to_inject(self, fn: AnyCallable) -> dict[str, Any]:
# Dealing with parameter
# Don't check here for none because as long as it exists in the bag, the value is good.
elif isinstance(param.annotation, ParameterWrapper):
values_from_parameters[name] = self.params.get(param.annotation.param)
values_from_parameters[name] = self.__params.get(param.annotation.param)
elif param.klass and (obj := self.__get_instance(param.klass, param.qualifier_value, param.annotation)):
values_from_parameters[name] = obj
else:
Expand All @@ -246,7 +246,7 @@ def __callable_get_params_to_inject(self, fn: AnyCallable) -> dict[str, Any]:
# If autowiring, the container is assumed to be final, so unnecessary entries can be removed
# from the context in order to speed up the autowiring process.
if names_to_remove:
self.context.remove_dependencies(fn, names_to_remove)
self.__service_registry.context.remove_dependencies(fn, names_to_remove)

return values_from_parameters

Expand Down

0 comments on commit 0994031

Please sign in to comment.