FIX, DOC: Bug in plot_evoked_joint API #13159
Open
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.
Fixes #13157
FYI It's a little more complicated that I thought...
The function plot_evoked_joint does have the default
exclude=None
, which actually does not work! 🚨 But the docstring was technically inline with theAPIfunction signature:mne-python/mne/viz/evoked.py
Lines 1794 to 1857 in df4a3f1
The method evoked.plot_joint has a default
exclude="bads"
. The docstring is copied from the functionplot_evoked_joint
to the methodevoked.plot_joint
which is where the docstring-to-code discrepancy arises:mne-python/mne/evoked.py
Lines 772 to 792 in 8f83332
TL;DR
We can update the docstring but we have to change
mne-python/mne/viz/evoked.py
Line 1800 in df4a3f1
to
exclude="bads"