Skip to content

Conversation

@aviatco
Copy link
Collaborator

@aviatco aviatco commented Dec 24, 2025

📥 Pull Request

✨ Description of new changes

To enable reuse, refactor the singleton logic currently in fab_context into a decorator and apply that decorator within fab_interactive.

@aviatco aviatco requested a review from a team as a code owner December 24, 2025 08:59
instances[class_] = class_(*args, **kwargs)
return instances[class_]

# Add a reset method to the decorator function for testing purposes
Copy link
Collaborator

Choose a reason for hiding this comment

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

if looks like we don't use reset_instance in code, only in tests. if so, let's remove it :) if necessary we will add in the future

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

we use it in the tests: test_config and test_fab_interactiveCLI

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This was only used in tests, so I removed it. I don’t think the code should contain test‑specific logic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants