Skip to content

Fix boolean bake override not working#770

Open
bysiber wants to merge 1 commit intoamoffat:developfrom
bysiber:fix-boolean-bake-override
Open

Fix boolean bake override not working#770
bysiber wants to merge 1 commit intoamoffat:developfrom
bysiber:fix-boolean-bake-override

Conversation

@bysiber
Copy link

@bysiber bysiber commented Feb 22, 2026

When a boolean argument is baked as True (e.g. ls.bake(a=True)), calling with a=False should override it and drop the flag. Currently the False value is silently discarded by compile_args while the baked -a flag remains in the argument list, so the override has no effect.

This fixes it by filtering out previously baked flags when a False override is passed, both in bake() (for chained bakes) and __call__() (for call-time overrides).

Fixes #753

When overriding a baked boolean True argument with False (e.g.
ls.bake(a=True)(a=False)), the False value was silently dropped by
compile_args while the baked True flag remained, so the override
had no effect.

Now both bake() and __call__() filter out previously baked flags
that are being explicitly overridden with False.
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.

Cannot override boolean baked arguments

1 participant