Skip to content

fix: 🐛 Don't call ProfileLoader.init if not required#246

Merged
remimd merged 1 commit intodevfrom
profile_loader
May 22, 2025
Merged

fix: 🐛 Don't call ProfileLoader.init if not required#246
remimd merged 1 commit intodevfrom
profile_loader

Conversation

@remimd
Copy link
Copy Markdown
Member

@remimd remimd commented May 22, 2025

No description provided.

@remimd remimd requested a review from Copilot May 22, 2025 18:32
@remimd remimd self-assigned this May 22, 2025
Copy link
Copy Markdown

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 conditionally skips calling profile_loader.init() when there are no module subsets, preventing unnecessary initialization.

  • Guard profile_loader.init() behind profile_loader.module_subsets check
  • Preserves existing decorator setup behavior when subsets are present
Comments suppressed due to low confidence (1)

injection/entrypoint.py:156

  • Add a unit test that covers the case when module_subsets is empty to verify that profile_loader.init() is indeed not called.
if profile_loader.module_subsets:

Comment thread injection/entrypoint.py
Comment thread injection/entrypoint.py
@remimd remimd merged commit 7ea3c59 into dev May 22, 2025
5 checks passed
@remimd remimd deleted the profile_loader branch May 22, 2025 18:36
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