fix: let MockResult accept and forward samples_summary - #569
Merged
Conversation
The subclass omitted samples_summary from its signature, so ag.m.MockResult(..., samples_summary=...) raised TypeError and callers could not avoid the parent's placeholder summary. Forward it to super(). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XqpBSWF2JDx4L9g1YCQk67
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
ag.m.MockResultsubclassesaf.m.MockResultbut omitssamples_summaryfrom its signature, so it is never forwarded tosuper():Callers therefore could not supply a summary at all through this subclass, and were silently forced onto the parent's placeholder summary. That placeholder filled every parameter with
1.0, which is an invalidell_comps— the failure fixed in PyAutoFit#1471.Change
Add
samples_summaryto the signature and forward it tosuper().__init__. One line each way; no behaviour change for existing callers, which passNoneby omission exactly as before.al.m.MockResultis this class (re-exported by PyAutoLens, not a second subclass), so PyAutoLens is covered by the same change — no separate fix needed there.Tests
test_autogalaxytest_autolensThe pre-existing PyAutoLens failure is
potential_correction/test_iterative_interferometer.py::test__solve_joint_optimization__identity_damping_finite; it reproduces without this change.Related
Depends on PyAutoFit#1471 for the placeholder-value fix itself. Merge that one first.
Generated by Claude Code