Skip to content

Fix recursive formatting in missing magnet model errors - #490

Open
BM804 wants to merge 1 commit into
python-accelerator-middle-layer:mainfrom
BM804:fix/magnet-missing-model-errors
Open

BM804 wants to merge 1 commit into
python-accelerator-middle-layer:mainfrom
BM804:fix/magnet-missing-model-errors

Conversation

@BM804

@BM804 BM804 commented Oct 16, 2026

Copy link
Copy Markdown

Fixes #475.

When a magnet has no accessor for strength or hardware, the error message formats the object. Formatting inspects those same properties and re-enters the error path. Use the magnet name directly instead in the regular, combined-function, and serialized magnet classes.

Add a regression test for missing strength and hardware accessors on an attached HCorrector.

Validation:

  • Changed Python files compile successfully.
  • The pytest regression test was not run locally because this environment does not have the project's dependencies installed; CI can run it in the project environment.

This branch has not been deployed

No deployments
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.

Infinite Loop in magnet repr

1 participant