Skip to content

Defer warp.config.* resolution in Module.__init__ by storing None and resolving on use #903

@shi-eric

Description

@shi-eric

As done in #856 for the module-level "mode" option, we should replace direct reads of warp.config.* in Module.__init__()’s self.options with None placeholders.

When an option is used, resolve it dynamically: if the local value is None, fall back to the current global warp.config.* value. This decouples module construction from global state, improves reproducibility and testability, and allows late changes to warp.config to take effect without going through clumsy wp.set_module_options() calls.

This will result in a change in behavior for users that were relying on the current "snapshot" behavior.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions