Skip to content

Conversation

@remimd
Copy link
Member

@remimd remimd commented Dec 6, 2025

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR modifies the dependency injection mechanism to prevent instantiating dependencies when they have been explicitly passed as arguments to an injected function. The implementation introduces an exclusion system that filters out dependencies whose parameters are already bound.

Key Changes

  • Modified the Dependencies class to accept an exclude parameter, filtering out dependencies by parameter name
  • Refactored bind and abind methods to first bind explicit arguments, then retrieve only non-excluded dependencies
  • Simplified the argument binding logic by separating concerns into __bind and __build_arguments methods

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@remimd remimd changed the title No longer instantiate a dependency if it has been explicitly passed feat: No longer instantiate a dependency if it has been explicitly passed Dec 6, 2025
@remimd remimd merged commit 7af0fdd into dev Dec 6, 2025
6 checks passed
@remimd remimd deleted the inject branch December 6, 2025 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants