Skip to content

fix: 🐛 load_profile#241

Merged
remimd merged 1 commit intodevfrom
fix
May 15, 2025
Merged

fix: 🐛 load_profile#241
remimd merged 1 commit intodevfrom
fix

Conversation

@remimd
Copy link
Copy Markdown
Member

@remimd remimd commented May 15, 2025

No description provided.

@remimd remimd requested a review from Copilot May 15, 2025 09:34
@remimd remimd self-assigned this May 15, 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 updates the load_profile method by replacing manual module unlocking with a single call to init_modules and switching the modules collection to a generator.

  • Removed the explicit tuple construction and unlock loop for modules.
  • Changed to self.unlock().init_modules(*modules) with modules as a generator expression.
Comments suppressed due to low confidence (2)

injection/_core/module.py:820

  • The explicit unlocking loop was removed, so modules may remain locked if init_modules doesn’t handle unlocking. Consider reintroducing module.unlock() calls or confirm init_modules performs unlocking.
modules = (self.from_name(name) for name in names)

injection/_core/module.py:820

  • Using a generator expression means modules are consumed once and evaluated lazily. For clarity and to avoid unexpected behavior if consumed multiple times, consider collecting into a tuple: modules = tuple(self.from_name(name) for name in names).
modules = (self.from_name(name) for name in names)

@remimd remimd merged commit 58961ce into dev May 15, 2025
5 checks passed
@remimd remimd deleted the fix branch May 15, 2025 09: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