Skip to content

[MAINT, MRG] Better transform error that prints coordinate frames#9622

Merged
larsoner merged 1 commit intomne-tools:mainfrom
alexrockhill:error
Jul 28, 2021
Merged

[MAINT, MRG] Better transform error that prints coordinate frames#9622
larsoner merged 1 commit intomne-tools:mainfrom
alexrockhill:error

Conversation

@alexrockhill
Copy link
Contributor

I thought it would be helpful to have the allowed coordinate frames for a transform. I also updated to fstring syntax while I was there so that the PR would do a bit more maintenance but that can be reverted if it's not helpful.

@alexrockhill
Copy link
Contributor Author

All the tests pass, good to go I think

Comment on lines 66 to +69
if cf not in _str_to_frame:
raise ValueError('Unknown cf %s' % cf)
raise ValueError(
f'Unknown coordinate frame {cf}, '
'expected "' + '", "'.join(_str_to_frame.keys()) + '"')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Someday we should just use _check_option for this

@larsoner larsoner merged commit 33d2aea into mne-tools:main Jul 28, 2021
@larsoner
Copy link
Member

Thanks @alexrockhill !

@alexrockhill alexrockhill deleted the error branch July 28, 2021 20:54
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.

2 participants