Skip to content

Improve encode_unit.default()#443

Merged
hfrick merged 1 commit intomainfrom
encode_unit-direction
Apr 9, 2026
Merged

Improve encode_unit.default()#443
hfrick merged 1 commit intomainfrom
encode_unit-direction

Conversation

@hfrick
Copy link
Copy Markdown
Member

@hfrick hfrick commented Apr 9, 2026

closes #430

I moved the check on the direction argument into the other methods so that the default method could do its job of erroring gracefully for when x is not a dials parameter. That seemed more straightforward than first checking if direction is missing before checking it. If we see the need to check direction centrally in the generic, we can bring it back.

@hfrick hfrick merged commit 690c438 into main Apr 9, 2026
15 checks passed
@hfrick hfrick deleted the encode_unit-direction branch April 9, 2026 12:07
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.

encode_unit() should only check the direction argument if it's supplied

1 participant