fix(export): parity/margins functions accept list or string precisions - #153
Merged
Conversation
The parity/margins entrypoints pass precisions.split(",") — a list —
into the remote functions, which then called .split again and crashed
with AttributeError. Every entrypoint invocation has been broken since
the loops learned to split; only direct ::parity_model CLI calls
worked. normalize_precisions accepts both forms.
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.
Why
The watchdog launched parity via the
::parityentrypoint and the runcrashed instantly: the entrypoint passes
precisions.split(",")(alist) into
parity_model, which called.split(",")on it —AttributeError. Every entrypoint invocation (
::parity,::margins)has been broken since PR #145 taught the function bodies to split;
only direct
::parity_modelCLI calls worked.What
normalize_precisions(precisions): acceptsstr | list[str],strips whitespace, drops empties.
parity_modelandmargin_modeliteratenormalize_precisions(...);entrypoints need no change (list passes through).
Evidence
with spaces normalizes)